Alternate row colors in Excel

In this article, you will learn how to highlight every second row of an Excel table.

Alternate row colors

1. Select the range you want to format. In this example, the entire table is selected.

Selected Excel table

2. Choose Home → Conditional Formatting → New Rule.

Conditional Formatting menu

3. Choose Use a formula to determine which cells to format and enter:

=MOD(ROW(),2)=0

The formula selects rows whose row number is divisible by two. To highlight every tenth row, replace 2 with 10. Next, choose the formatting style.

New formatting rule

4. Choose how to format the cells. This example uses a gray fill.

Format cells dialog

5. Click OK to apply the changes.

Confirm the new rule

6. Check the result.

Table with alternating row colors

If the selected range includes cells with drop-down lists, the rule may not work as expected. Try selecting a different range or use another method, such as formatting the table with a built-in style.

Article author: Andrei Olegovich