View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
WhytheQ WhytheQ is offline
external usenet poster
 
Posts: 246
Default Conditional Formatting in 2007

Excel2007
I'm trying to write a small macro to add conditional formatting back
into a sheet after a pivot table has been refreshed (MS still don't
seem to have fixed the problem where cond.formatting is lost on
refresh).
The Pivots data areas are in D8:K200 and there is a formula (MAX) in
column R.
The following seems to produce strange results:

With ActiveSheet.Range("$D$8:$K$200")
.FormatConditions.Delete
.FormatConditions.Add xlExpression, , "=D8=$R8"
With .FormatConditions(1).Font
.Bold = True
.Color = -16776961
End With
End With

Does this work on other people's machines?
Does is produce strange results?

Any help greatly appreciated
JasonQ.