Shade every second row : Row Format « Excel « VBA / Excel / Access / Word






Shade every second row

 

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.Select every other row and apply the formatting:
2.Shade every second row by using the Do Until Loop
3.Shade every second row by using the Do Loop