View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
merjet merjet is offline
external usenet poster
 
Posts: 812
Default IF Statement and Font Color

Yes, with VBA (not IF worksheet function). An example:

Sub macro1()
If Sheets("Sheet1").Range("A1").Font.ColorIndex = 1 Then
Sheets("Sheet1").Range("B1") = "black"
ElseIf Sheets("Sheet1").Range("A1").Font.ColorIndex = 3 Then
Sheets("Sheet1").Range("B1") = "red"
ElseIf Sheets("Sheet1").Range("A1").Font.ColorIndex = 10 Then
Sheets("Sheet1").Range("B1") = "green"
End If

Hth,
Merjet