I’m using the following simple conditional formatting: when a cell contains a number it must change in a grey pattern.
I’m using the macro below but it doesn’t apply the Pattern and the PatternColorIndex. The Colorindex works perfect. Does anybody know what is wrong in this code?
For c = 1 to 5
Range(Cells(c, 5), Cells(c, 7)).Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=ISNUMBER(E" & c & ")"
Selection.FormatConditions(1).Font.ColorIndex = 55
.ColorIndex = 0
.Pattern = xlGray50
.PatternColorIndex = 15
c = c+1