If statement to test font color

G

Gary

I have seen this question in reverse on the forum. Usually the question is
to change the font color when criteria is met.

I need to test the font color in order to determine value. I can do it in
code with a for..next loop but I was wondering if it could be done in an if
statement?

Example: If(fontcolor (A2) = "Red", then "Next Day", "Standard")

What would be the syntax?

Thanks for the help.
 
P

PDUK1

Try this:

Sub FontColor()
MsgBox "The Font Color Index is " & ActiveCell.Font.ColorIndex
End Sub

If Cell.Font.ColorIndex = 3 Then xxxx

Peter
 
G

Gary

Peter,

Thanks for the quick response.

I may not have been clear. I was looking for a way to enter that same idea
into a cell. Is that possible?
 
Top