tech on the net

MS Excel: Automatically alternate row colors (one shaded, one white) in Excel 2003/XP/2000/97

See solution in other versions of Excel:

Question: How can I set up alternating row colors in Microsoft Excel 2003/XP/2000/97? I don't want to have to change the row colors every time I insert, delete, or move a row.

Answer: If you wish to set up alternating row colors in Excel, first highlight the rows that you wish to apply the formatting to. In this example, we've selected all rows in the spreadsheet.

Microsoft Excel

Under the Format menu, select Conditional Formatting.

Microsoft Excel

When the Conditional Formatting window appears, select "Formula Is" in the drop down. Then enter the following formula:


Next, we need to select the color we want to see in the alternating rows. To do this, click on the Format button.

Microsoft Excel

When the Format Cells window appears, select the Patterns tab. Then select the color that you'd like to see. In this example, we've selected a light grey. Then click on the OK button.

Microsoft Excel

When you return to the Conditional Formatting window, you should see the following. Next, click on the OK button.

Microsoft Excel

Now when you return to the spreadsheet, the conditional formatting will be applied.

As you can see, you now have alternating colors in the rows. You can insert, delete, and move rows, and you don't have to worry about reapplying formatting.

Microsoft Excel

What a wonderful formatting trick!