Sub topic 12
What Happens to Groups When Data Changes
This chapter assumes you can already group dates, numbers, and text in a PivotTable. It also assumes the source data is a table or contiguous range with one header row. Here you will learn which parts of a grouping survive a refresh, which parts change, and which changes need your attention.
Refresh and grouping are separate steps
A PivotTable does not read the worksheet every time you look at it. It reads a stored copy of the source data, called the pivot cache. Editing a cell in the source changes nothing in the PivotTable until you refresh.
- Refresh (Alt+F5, or PivotTable Analyze > Refresh) reloads the cache for the selected PivotTable.
- Refresh All (Ctrl+Alt+F5) reloads every connection and PivotTable in the workbook.
- Refresh data when opening the file is an option under PivotTable Analyze > Options > Data. It refreshes the cache each time the workbook opens.
The grouping rules (the unit, the start, the end, the interval, and any manual text groups) belong to the PivotTable field and its cache. They are not part of the source data. A refresh re-reads the data and applies the stored rules to it. It does not remove them.
Date groups after a refresh
Grouping by months, quarters, or years keeps working when new rows arrive, as long as the new dates are real dates.
- New dates inside the existing range are added to the matching group. A new order dated 14 March adds to the March total.
- New dates later than the old last date extend the groups if "Ending at" was left at its default. The PivotTable then shows the new months.
- A typed "Starting at" or "Ending at" date is fixed. Dates outside it appear in separate groups labelled like
<1/1/2024and>12/31/2024. If you see those labels after a refresh, the typed limits no longer cover your data. Reopen the Grouping dialog and widen or reset them. - Months with no data inside the range still appear as rows. A grouped date axis is continuous, so a quiet month shows as a blank row and is not skipped.
Weekly groups follow the same rule. You group by Days with "Number of days" set to 7 and a chosen start date. That start date stays where you set it. If you typed a Monday as the start, every later week still begins on that Monday. The risk is data that arrives before your start date. It lands in a < group, not in an earlier week.
Numeric groups after a refresh
A numeric grouping stores three values: Starting at, Ending at, and By. When you accept the defaults, current Excel versions recalculate the first two from the data on refresh. When you type them, they stay fixed.
| Situation after refresh | Result |
|---|---|
| New value falls between Starting at and Ending at | Counted in the matching range, such as 30-39 |
| New value is above a typed Ending at | Appears in a `>` group, for example `>100` |
| New value is below a typed Starting at | Appears in a `<` group, for example `<0` |
| Starting at and Ending at were left at their defaults | Limits move with the data, so ranges can be added or shifted |
| A range has no rows any more | The range still shows if it lies between the limits, with no values |
The < and > groups are a useful warning. A bucket you did not plan for means your data has moved outside your assumptions. Treat them as a prompt to check the limits, not as clutter to hide.
Manual text groups after a refresh
Manual groups are the most fragile kind. When you select items such as North and South and group them, Excel creates a new group field, often named like Region2. It stores which item names belong to Group1. It does not store a rule.
This has three consequences:
- A new item is not placed in any group. If a new region
Centralappears in the source, it shows up in the group field under its own name, outsideGroup1. You must select it and group it yourself. - A renamed source value is a new item. If someone changes
NorthtoNorthernin the source, Excel sees a new item. The old one may still be listed. After refresh,Northernsits outside the group. - Renamed group labels are kept. If you renamed
Group1toNorthern Area, that label survives refresh, because it is stored with the grouping.
If old items linger in the field's filter list after the source value is gone, open PivotTable Analyze > Options > Data. Set "Number of items to retain per field" to None, then refresh. You can set it back to Automatic afterwards.
A related setting matters when you filter a group field. If you filtered manually (for example, unticked one group), new items may be hidden or shown depending on "Include new items in manual filter". You find it under Field Settings > Totals & Filters. Check it when a new group seems to be missing.
The source range must grow with the data
Grouping can only apply to rows the cache contains. If the PivotTable's source is a fixed range such as A1:D500 and you append row 501, refresh will not see it. The result looks like a grouping failure, but the new rows were never loaded.
Convert the source to an Excel Table (Ctrl+T) before building the PivotTable. The PivotTable then uses the table name as its source, and the range grows as you add rows. If the PivotTable already exists, use PivotTable Analyze > Change Data Source and select the table name.
When a refresh breaks the grouping
Date and number grouping needs every value in the field to be a real date or number. A refresh can bring in a value that violates that rule: a date pasted as text, a "n/a" in a numeric column, or a blank in a date column. Depending on the version and data, the result is one of these:
- the groups disappear and the raw values appear;
- the grouped field stops grouping, and grouping again gives "Cannot group that selection";
- the text values appear in their own item, apart from the date or number groups.
Test the source before you blame the PivotTable. In a spare column, enter the following formula next to the first row, then fill it down:
=ISNUMBER(A2)Any FALSE is a cell holding text. Fix those cells, refresh, and group again if the grouping was lost. Chapter 10 of this tutorial covers the full diagnosis.
Helper columns survive refresh best
A helper column is a formula column in the source data that computes the bucket for each row. The PivotTable then uses that column as an ordinary field and has no grouping to lose. This makes helper columns the most predictable choice when data changes often.
Suppose your fiscal year starts in July and is named after the year in which it ends. Put this in a helper column next to the dates:
=YEAR(A2)+(MONTH(A2)>=7)For weekly periods that always start on Monday, use this column:
=A2-WEEKDAY(A2,2)+1For equal-width numeric buckets of 10, use this one:
=FLOOR(B2,10)When the source is an Excel Table, these formulas fill down automatically for every new row. After a refresh the PivotTable sees new fiscal years, new weeks, and new buckets without any change to the PivotTable. A new fiscal year appears as a new row item. No limit can be exceeded, and no < or > group can appear.
There are two trade-offs:
- A new column is not a new field automatically. If you add a helper column after building the PivotTable, refresh before looking for it in the field list.
- Helper values are static labels. A fiscal year like
2025is a number, so it sorts correctly. A text label such asQ1sorts alphabetically, which is fine for quarters but poor for longer labels. Add a numeric sort key if the order matters.
Shared caches: one grouping affects several PivotTables
If you create a second PivotTable by copying the first, or by choosing the same source in the same workbook, the two often share one cache. Grouping a date field in one PivotTable can then group the same field in the other. A refresh of one refreshes both.
This is useful when you want consistent groups. It surprises people who wanted a monthly view in one report and a yearly view in another. If you need independent grouping, use a helper column for one of them or build the second PivotTable so it gets its own cache. Test it by grouping in one PivotTable and checking the other.
Checklist after the data changes
- Refresh the PivotTable, or use Refresh All if several depend on the same source.
- Confirm the source range or table included the new rows.
- Look for
<or>groups, which mean typed limits are too narrow. - Look for ungrouped text items that belong in a manual group.
- Check that date and number columns still hold only real dates and numbers, using
ISNUMBER. - If a report must be stable and low-maintenance, move the grouping into helper columns.
Exercise
A PivotTable groups Order Date by Months and Years, with "Ending at" typed as 12/31/2025. Next month you append orders from January 2026 to the source Table and refresh. Where do the new orders appear, and what are two ways to fix it?
Show answer
The new orders appear in a separate group labelled like >12/31/2025, because the typed end date is fixed. One fix is to open the Grouping dialog on the date field and change "Ending at" to a later date, or to the last date in the data. The other fix is to add a helper column such as =YEAR(A2)+(MONTH(A2)>=7) or a similar formula to the Table and use it as the field, since a helper column has no end limit.
Exercise
You manually grouped the regions North and South into Northern Area. After a refresh, a new region Northeast shows up in the PivotTable outside that group. Why, and what must you do?
Show answer
Manual groups store a list of the item names selected at the time, not a rule. Northeast was not in that list, so it appears as its own item. Select Northeast together with Northern Area in the group field and group them again, or add a helper column in the source that maps each region to an area, so new regions are handled by the formula.