View Single Post
 
Old 05-10-2018, 09:40 PM
jolivanes jolivanes is offline Windows 10 Office 2013
Advanced Beginner
 
Join Date: Sep 2011
Posts: 91
jolivanes will become famous soon enough
Default

Code:
Sub Maybe()
Dim c As Range
For Each c In Range("A1:D12")    '<---- Change Range as required
    With c
        Select Case .Interior.Color
            Case Is = vbRed
                c.Value = -1
                    Case Is = vbGreen
                        c.Value = 1
                    Case Is = vbYellow
                c.Value = 0
            Case Else
        End Select
    End With
Next c
End Sub
You might have to find out the RGB colors of the cells and change the code accordingly
Reply With Quote