Help with refering to conditionl format

  • Thread starter Thread starter sidata
  • Start date Start date
S

sidata

I am trying to set the value of a cell based on conditional format font
colour
I managed following :-

Dim c As Range
For Each c In ActiveSheet.Range("c2:h2")
If c.Font.ColorIndex = 45 Then c.Offset(2, 0).Value = "20"
Next c

How can i get this to look at current font colour?
Have tryed "FormatConditions(1).Font.ColorIndex" but this looks at setting.

Also need to change "Value = "20" so that is looking at 1st cell of current
row.

Thanks for any help
 
Instead of trying to look at the conditional formatting, you could look
at the same conditions that you used for conditional formatting. For
example,

If c.Value>10 then c.Offset(2,0).Value=20
 
Back
Top