I am trying to make a range of cells change font color when one of them is changed. Initially, I have all the cells as red. If one of the cells is changed to blue, I want all the cells to change to blue. This is what I have tried to no avail:
I am fairly new to VBA and certainly new to looping. I feel this is something really small. Any help?
Code:
Dim oCell as Range
Dim FontColor as String
For Each oCell in Range("D5:d11")
[INDENT]If oCell.Font.Color <> vbRed then
FontColor = oCell.Font.Color
oCell.Font.Color = FontColor
[/INDENT]End if
Next
I am fairly new to VBA and certainly new to looping. I feel this is something really small. Any help?