View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ludo Ludo is offline
external usenet poster
 
Posts: 74
Default alternate rowshading using conditional format excel 2007/2010

Hi,

I'm using following code on a Excel 2003 version without problems to change the row shading.
Formula comes from John Walkenbachs site see:
http://spreadsheetpage.com/index.php...al_formatting/
The code comes from the macro recorder from Excel 2003:

Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=MOD(ROW();2)=0"
Selection.FormatConditions(1).Interior.ColorIndex = intColorIndex

where intColorIndex is a number from 1 to 56.

But this isn't working anymore in Excel 2007!

Anyone knowing how to code it for Excel 2007/2010?

Thanks in advance.
Ludo