
Use the MOD and COLUMN functions to shade
every third column
The previous tip showed how to mark every third row. Now let’s
find out how to automatically mark every third column in a range.
Use the COLUMN function in combination with MOD. The
COLUMN function returns the column number of the active cell
and divides it by 3 with the MOD function. If the remainder is zero,
the column can be shaded through conditional formatting.
4
To shade every third column:
1. Select range A1:P14.
2. On the Format menu, click Conditional Formatting.
3. Select Formula Is and type the following formula:
=MOD(COLUMN(),3)=0.
4. Click Format.
5. From the Patterns tab, select a color ...