
Use the MOD and ROW functions to shade
every third row
In this example, every third row of a table has to be marked. To do
this automatically, use the ROW function in combination with MOD.
The ROW function returns the row number of the active cell and
then uses the MOD function to divide it by 3. If the remainder is
zero, the row can be shaded using conditional formatting.
4
To shade every third row:
1. Select rows 1 to 20.
2. On the Format menu, click Conditional Formatting.
3. Select Formula Is and type the following formula:
=MOD(ROW(),3)=0.
4. Click Format.
5. From the Patterns tab, select a color and click OK.
6. Click OK.
Note: Up to three conditions ...