Mark Easter
New Member
- Joined
- May 24, 2011
- Messages
- 3
Using Excel 2003, I have a conditional formatting problem where the exact same formatting works when entered manually but does not work when entered using vba. However, the vba formatting works after simply opening the Conditional Formatting dialog and clicking OK without making any changes.
The vba code fragment follows ...
Is this a bug? Is there a way around it?
The vba code fragment follows ...
Code:
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=COUNT(IF($I$2:$I$2307="""",IF($L$2:$L$2307<>""noscript"",IF($E$2:$E$2307<9000,1,IF($E$2:$E$2307>9999,1,"""")),""""),""""))>0"
Selection.FormatConditions(1).Interior.ColorIndex = 22
Is this a bug? Is there a way around it?