View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
scrabtree[_2_] scrabtree[_2_] is offline
external usenet poster
 
Posts: 47
Default conditional formatting

I have wrote a VBA code to add conditional formatting to a
cell. Here is the code:

With Sheets("T.S.").Range("AD10")
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression,
Formula1:= _
"=IF(AD10=895,0,IF(AD10=0,0,1))"
.FormatConditions(1).Font.ColorIndex = xlAutomatic
.FormatConditions(1).Interior.ColorIndex = 3

However...it isn't adding the formatting???