View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default if end if sanity check...


Sub ColorEveryOtherRow()
Dim startRow as long
Dim endrow as Long
Dim i as long
StartRow = 5
EndRow = 47
for i = startrow to endrow step 2
cells(i,1).Resize(1,15).Interior.ColorIndex = 3
Next i
End sub

--
Regards,
Tom Ogilvy


"okrob" wrote:

would someone take a look at this and let me know if there is a
shorter method? I only want to change the color on every other row
from Column A to O...
I just modified a 'select every other row' code someone posted here.
This works, but I thought maybe it could be cleaned up a bit.
Rob