No need for a macro, use conditional formatting, see
http://www.xldynamic.com/source/xld.CF.htmlrows
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
wrote in message
ups.com...
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