Conditional Formatting in PivotTables

Written by Allen Wyatt (last updated February 13, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003


David is wondering if it is possible to apply conditional formatting to PivotTables. He would like to use conditional formatting so that when a table is refreshed the conditional formatting is applied to the new data in the PivotTable.

There is nothing that we have found that stops conditional formatting from being applied to a PivotTable. After creating the PivotTable you can apply the conditional formatting and it should work just fine. The problem, however, comes when you refresh the PivotTable and the refreshing results in the PivotTable being enlarged. In that case Excel expands the PivotTable into cells not previously used by the table. These cells also have no conditional formatting applied, so Excel doesn't know that it should apply it.

You can get around this problem by making sure that you apply conditional formatting to more than just the cells presently visible in the PivotTable. You should select a larger range of cells (including those outside the current PivotTable) and apply conditional formatting to that expanded range. In this way Excel can "retain" that formatting as it expands the PivotTable during a refresh.

The obvious problem with this approach, however, is that the flexibility of the conditional formatting is seriously hampered. If you have several conditional formats applied to the PivotTable, and those formats are not the same as each other, then how can you effectively apply those formats to an expanded cell range? Unfortunately there is no good answer to this possibility.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7002) applies to Microsoft Excel 97, 2000, 2002, and 2003.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Selecting an Entire Worksheet

While editing, you may need to select everything in a worksheet. Excel provides three easy ways you can accomplish this.

Discover More

Jumping to a Footnote

Jumping to a specific footnote can be very handy if your document has a lot of footnotes in it. Word provides the ...

Discover More

Calculating a Geometric Standard Deviation

One of the areas in which Excel provides worksheet functions is in the arena of statistical analysis. You may want to ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (menu)

Too Many Rows or Columns in a PivotTable

PivotTables are often used to aggregate lots of information, and they do it beautifully. What do you do if Excel starts ...

Discover More

Counting with PivotTables

One of the ways you can use PivotTables is to generate counts of various items in a data table. This is a great technique ...

Discover More

Default Formatting for PivotTables

Wish there was a way to define how you want PivotTables formatted before you actually create the PivotTable? You may be ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 8 - 5?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.