How to Fix Excel Changing the Applies To Range for Conditional Formatting
Question details
The user needs to understand why the 'Applies to' range in conditional formatting shifts automatically and how to prevent it when refreshing PivotTables or updating data.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Refreshing a PivotTable or updating dynamic data regions that have conditional formatting applied to them.
- Observed behavior
- The conditional formatting 'Applies to' range automatically changes, expanding or contracting with the data, rather than remaining static.
Determine whether your data is housed within a PivotTable or a standard data range, as the method for preserving the conditional formatting rule differs.
Use PivotTable Formatting Options for Dynamic Ranges
The most effective way to preserve formatting in a PivotTable is to apply the rule directly to the PivotTable fields rather than using a static cell range.
When you apply conditional formatting to a PivotTable, Excel's default design is to expand and contract the range dynamically as your data updates. To prevent your rules from fragmenting or breaking, you must link the formatting rule directly to the PivotTable field hierarchy.
Click on any single cell within the PivotTable value field you want to apply conditional formatting to.
Navigate to the 'Home' tab, click 'Conditional Formatting', and set up your desired rule (e.g., Highlight Cells Rules > Greater Than).
Once the rule is applied, a small 'Formatting Options' icon will appear right next to the formatted cell. Click it to open the dropdown menu.
Select the option that says 'All cells showing [Field Name] values' instead of 'Selected cells'. This links the rule to the field logic, ensuring it stays intact during a refresh.

Convert Standard Ranges to Excel Tables
If your data is not in a PivotTable but updates dynamically, use an Excel Table to automatically manage the conditional formatting range without breaking.
Format Pivot Tables Seamlessly in WPS Spreadsheet
WPS Spreadsheet provides robust, fully compatible PivotTable tools. You can apply conditional formatting rules that automatically adapt to your data changes without the hassle of fragmented or broken ranges upon refresh.
- 1. Open your data file: Launch WPS Spreadsheet and open your existing Excel workbook containing the data.
- 2. Insert a Pivot Table: Go to the 'Insert' tab, select 'PivotTable', and drag your desired fields into the Rows and Values areas.
- 3. Apply formatting: Highlight a value in your PivotTable, go to 'Home' > 'Conditional Formatting', and configure your rule.
- 4. Manage rule scope: Open 'Manage Rules', edit the newly created rule, and apply it to the specific PivotTable field to lock it in place for future refreshes.

Frequently Asked Questions
Why does my conditional formatting disappear when I refresh my Pivot Table?
This happens if the conditional formatting was originally applied to fixed cell coordinates (like A1:A10) instead of being linked to the PivotTable fields. When the PivotTable refreshes and its size changes, the static references no longer align correctly with the data, causing the formatting to seemingly vanish.
How do I permanently lock the 'Applies to' range in Excel conditional formatting?
For static data sets, you can use absolute references (like $A$1:$B$10) in the 'Applies to' box. However, if the data updates frequently or resides in a PivotTable, locking the range with dollar signs will cause errors. Instead, convert non-pivot data to an Excel Table, or use PivotTable-specific conditional formatting scopes.
Can I apply conditional formatting to Grand Totals in a PivotTable?
Yes. When editing your conditional formatting rule, you have the option to apply the rule to 'All cells showing [Field] values'. Depending on your exact needs, you can choose the option that either includes or excludes the subtotal and grand total rows.




