Matt40Forte
New Member
- Joined
- Jul 27, 2017
- Messages
- 3
Hey Everyone,
I have a macro written in order to judge a cell based off its color. The code is below:
Function CheckColor1(range)
If range.Interior.Color = RGB(255, 0, 0) Then
CheckColor1 = "Stop"
ElseIf range.Interior.Color = RGB(0, 255, 0) Then
CheckColor1 = "Go"
Else
CheckColor1 = "Neither"
End If
End Function
This works for cells that I have filled manually, but if I have conditional formatting with the specified colors I just get "Neither".
Is there a way to modify this for it to work with conditional formatting fills?
I have a macro written in order to judge a cell based off its color. The code is below:
Function CheckColor1(range)
If range.Interior.Color = RGB(255, 0, 0) Then
CheckColor1 = "Stop"
ElseIf range.Interior.Color = RGB(0, 255, 0) Then
CheckColor1 = "Go"
Else
CheckColor1 = "Neither"
End If
End Function
This works for cells that I have filled manually, but if I have conditional formatting with the specified colors I just get "Neither".
Is there a way to modify this for it to work with conditional formatting fills?