If need be, you can get the RGB values with this.
Select a colored cell and run this code. Use this in the "Maybe_With_RGB()" macro
Code:
Sub ShowColour()
Dim RGBColour As String, R As Integer, G As Integer, B As Integer, c As Range
RGBColour = Right("000000" & Hex(Selection.Interior.Color), 6)
R = WorksheetFunction.Hex2Dec(Right(RGBColour, 2))
G = WorksheetFunction.Hex2Dec(Mid(RGBColour, 3, 2))
B = WorksheetFunction.Hex2Dec(Left(RGBColour, 2))
MsgBox "RGB(" & R & ", " & G & ", " & B & ")"
End Sub
Code to fill with numbers
Code:
Sub Maybe_With_RGB()
Dim c As Range
For Each c In Range("A1:D12") '<----- Change to actual used colored range
With c
Select Case .Interior.Color
Case Is = RGB(255, 0, 0) '<----- Change to what you get for Red
c.Value = -1
Case Is = RGB(0, 255, 0) '<----- Change to what you get for Green
c.Value = 1
Case Is = RGB(255, 255, 0) '<----- Change to what you get for Yellow
c.Value = 0
Case Else
End Select
End With
Next c
End Sub