Select every other row and apply the formatting: : Row Format « Excel « VBA / Excel / Access / Word






Select every other row and apply the formatting:

 
     Sub ShadeEverySecondRow()
         range("A2").EntireRow.Select
         Do While ActiveCell.value <> ""
             Selection.Interior.ColorIndex = 15
             ActiveCell.offset(2, 0).EntireRow.Select
         Loop
     End Sub

 








Related examples in the same category

1.Shade every second row
2.Shade every second row by using the Do Until Loop
3.Shade every second row by using the Do Loop