Pivot tables in an Excel test: build it, then make it survive new data
A pivot table is the fastest way to summarise an export in a test. It is also the easiest summary to leave out of date.
In short: Select the data, then Insert › PivotTable, and drag Region to Rows and Sales to Values. The trap: a pivot doesn't update on its own. After new rows, you must refresh (Alt+F5 on Windows), and the new rows only count if the source is an Excel Table. In the example, the total should go from 26,200 to 31,300.
The test question
Brief: "Summarise sales by region." The export has ten rows. The first summary is:
| Region | Sales |
|---|---|
| North | 8,300 |
| South | 7,200 |
| East | 4,100 |
| West | 6,600 |
| Total | 26,200 |
Build it in under a minute
- Click any cell in the data and press Ctrl+T to make it a Table. This is the step most people skip.
- Insert › PivotTable › OK.
- Drag Region to Rows and Sales to Values.
- If it says "Count of Sales" instead of "Sum of Sales", some sales are text. Fix the data, then use Value Field Settings › Sum.
The trap: three late rows
The reviewer pastes three more orders under the data: East 2,400, North 1,600 and West 1,100. Your pivot still shows 26,200. Pivots never update on their own.
| Region | Before | After refresh |
|---|---|---|
| North | 8,300 | 9,900 |
| South | 7,200 | 7,200 |
| East | 4,100 | 6,500 |
| West | 6,600 | 7,700 |
| Total | 26,200 | 31,300 |
- Source is a Table: the new rows join it. Refresh (Data › Refresh All, or Alt+F5) and you get 31,300.
- Source is a fixed range like A1:C11: refresh does nothing, because the new rows are outside the range. You must change the data source.
If the test is marked automatically, or the brief says "the data will be updated", SUMIFS formulas are often safer. They recalculate on their own. See SUMIFS.
Three pivot settings that come up
- % of total: Value Field Settings › Show Values As › % of Grand Total.
- By month: put a date in Rows, then right-click › Group › Months (add Years if the data crosses a year end).
- Pulling one number out: typing = and clicking a pivot cell makes a GETPIVOTDATA formula. That's fine, but it fails if the item disappears.
Questions people ask
Why doesn't my pivot table update?
Pivot tables only update when refreshed. If refresh doesn't pick up new rows, the source is a fixed range. Make the data a Table (Ctrl+T) and point the pivot at it.
Pivot table or SUMIFS in an Excel test?
A pivot is faster to build and good for exploring. SUMIFS updates by itself and is easier to check and to put in a fixed layout. Many finance tests expect formulas for the final table.
Why does my pivot show Count instead of Sum?
At least one value in the column is text or blank. Excel then defaults to Count. Fix the text numbers, then switch the field to Sum.
Now try one that marks itself
The free check gives you an email, a messy export and 10 minutes. It re-runs your formulas on data you haven't seen and shows what broke.