How do I test a specific color in 2003?

S

Sp3ct4tor

I need to include a color test into If function.
Example:
If font text in cell A1 is green, then write "400"
(I have more colors to test than 2 so I can't use the CELL function)

Thanks in advance.
 
G

Gary''s Student

Try this UDF:

Function fontcolor(r As Range) As Integer
Application.Volatile
fontcolor = r.Font.ColorIndex
End Function
 
Top