View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] rgoubet@yahoo.fr is offline
external usenet poster
 
Posts: 6
Default Background color for every other row

Hi,

I'm trying to write a macro that will set a different background color
for every other row of the selection (not of the whole worksheet).

I figured that I would just need to loop through each cell of the
selection, test whether it's in an even-number row, and if so, set its
background color. So if the selection covers 3 columns, every other set
of 3 cells in the selection would get a background color.

But... there doesn't seem to be a property to test the row number of a
given cell! So how could I work this out?

Thanks in advance for your help.

Raph