View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default How do I test a specific color in 2003?

Try this UDF:

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

--
Gary''s Student - gsnu200776


"Sp3ct4tor" wrote:

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.