Apply shading to alternate rows in a worksheet

This article shows you how to automatically apply shading to every other row in a worksheet. You can apply the shading by using a simple conditional formatting formula. Alternatively, you can apply a predefined Excel table style to your data.

Technique 1: Apply shading to alternate rows by using conditional formatting

One way to apply shading to alternate rows in your worksheet is by creating a conditional formatting rule. This rule uses a formula to determine whether a row is even or odd numbered, and then applies the shading accordingly. The formula is shown here:

=MOD(ROW(),2)=0

On the worksheet, do one of the following:

To apply the shading to a specific range of cells, select the cells you want to format.

To apply the shading to the entire worksheet, click the Select All button.