Article ID: 268568 - View products that this article applies to.
This article was previously published under Q268568
It is often easier to read lists of data if alternate rows are shaded. This article shows you how to use conditional formatting to shade alternate rows.
Note Conditional formatting is automatically copied to newly added rows. You can also shade alternate rows by using a Visual Basic for Applications (VBA) macro. However, if you use the VBA macro, you must run the macro again every time that new rows of data are added. For more information about how to use a macro to shade every other row in Excel, click the following article number to view the article in the Microsoft Knowledge Base:
(https://support.microsoft.com/kb/213616/ )Macro to shade every other row in a selection in Excel
Conditional formatting is a Microsoft Excel feature that sets a cell's format according to conditions that you specify. Conditional formatting allows you to present numeric data in different colors; for example, you can shade data depending on whether the value is greater, equal to, or less than zero. You can also present list data against a background pattern of alternating shades, as in the following example.
To apply alternating shades to the rows of your worksheet, follow these steps:
Note If formatting is not consistently applied after data is entered, use a formula that checks for blanks first. With this approach, however, the formatting does not appear until you enter values. To do this, follow these steps:
For more information about conditional formatting, click Microsoft Excel Help on the Help menu, type change, add, or remove conditional formats in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.
For more information about the MOD worksheet function, click Microsoft Excel Help on the Help menu, type mod in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.
Article ID: 268568 - Last Review: January 27, 2007 - Revision: 5.3