Friday, November 13, 2009

Using Conditional Formatting to Shade Rows

If you need to shade alternating rows in a data table, you'll want to examine how you can accomplish the task with conditional formatting.

If you haven't tried out the conditional formatting features of Excel before, they can be quite handy. One way to use this feature is to cause Excel to shade every other row in a table. This is great when you have a particularly wide table, and you want to make it a bit easier to read on printouts. Simply follow these steps:

1. Select the table whose alternate rows you want to shade.

2. Make sure the Home tab of the ribbon is displayed.

3. Click the Conditional Formatting tool. Excel displays a series of choices.

4. Click New Rule. Excel displays the New Formatting Rule dialog box.

5. In the Select a Rule Type area at the top of the dialog box, choose "Use a Formula to Determine Which Cells to Format"

6. In the formula space, enter the following formula:

=MOD(ROW(),2)=0

7. Click on the Format button. Excel displays the Format Cells dialog box.

8. Make sure the Fill tab is selected.

9. Select the color you want used for the row shading.

10. Click on OK to close the Format Cells dialog box.

11. Click on OK to close the New Formatting Rule dialog box.

Those familiar with Excel may wonder why anyone would use conditional formatting to highlight different rows of a table when you can use the table formatting feature (available in the Styles group of the Home tab of the ribbon) to accomplish the same thing. The reason is simple—using conditional formatting provides much more flexibility in the formatting applied as well as in the interval of the rows being shaded.


Posted courtesy of Tips.Net

0 comments:

Post a Comment