Change the font color based on the value of the cell
may be this one
assumed your value is in Cell A1
Private Sub worksheet_change(ByVal target As Range)
target = Range("A1")
For a = 1 To 7 Step 2
If target = a Then
target.Font.ColorIndex = 3
Exit Sub
Else
target.Font.ColorIndex = 0
End If
Next
End Sub
On Feb 9, 1:33*am, Robin wrote:
How do I create a macro or program to change the font color of a particular
cell based on the value of the cell, e.g. 1 3 5 7, change the font color to
red, if 0, 00 change font color to green and bold, thanks in advance
|