What is a PivotTable in Excel and when do you need one
A PivotTable turns thousands of rows into a report in seconds without a single formula. How it works, when to use it and how to prepare the source data.
Imagine your shop made 5,000 sales in a year, each on its own row in Excel. Your manager asks: “How much did each region sell? Which product brought in the most revenue? Which month was the weakest?” With formulas, that is at least an hour of work.
A PivotTable turns a large table into a short report in a few seconds — with the mouse. You only say what goes into rows, what goes into columns and what to calculate; Excel does the grouping, adding up and totals.
Best of all, a PivotTable writes no formulas and never changes your source data. Rebuild the report as often as you like — nothing breaks.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Date | Region | Manager | Product | Qty | Amount | |
| 2 | 15.01.2025 | Tashkent | Aziz | Laptop | 3 | 25 500 000 | |
| 3 | 20.02.2025 | Samarkand | Dilnoza | Monitor | 5 | 12 000 000 | |
| 4 | 10.04.2025 | Tashkent | Malika | Printer | 2 | 6 400 000 | |
| 5 | 05.05.2025 | Bukhara | Javohir | Laptop | 2 | 17 000 000 | |
| 6 | 18.07.2025 | Samarkand | Dilnoza | Laptop | 1 | 8 500 000 | |
| 7 | 22.08.2025 | Tashkent | Aziz | Monitor | 4 | 9 600 000 | |
| 8 | 12.11.2025 | Bukhara | Javohir | Printer | 3 | 9 600 000 | |
| 9 |
The result: from a list of sales to a report by region
The PivotTable below was built from the table above. The Region field is in rows and Amount is in values. Excel merged identical regions, added up the amounts and appended a Grand Total row.
The PivotTable Fields pane on the right is the control panel: the source columns at the top (in a PivotTable they are called fields) and four areas at the bottom.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Row Labels | Sum of Amount | ||
| 2 | Bukhara | 26 600 000 | ||
| 3 | Samarkand | 20 500 000 | ||
| 4 | Tashkent | 41 500 000 | ||
| 5 | Grand Total | 88 600 000 | ||
| 6 |
Four areas — the whole logic of a PivotTable
The four areas at the bottom of the pane define the shape of the report:
- Rows — which values become rows: regions, managers, months.
- Columns — the same, but spread across columns. Rows + Columns = a cross-tab (matrix).
- Values — what is calculated: sum of revenue, number of sales, average sale.
- Filters — narrow the whole report by one condition, for example a single region.
Drag a field from one area to another and the report is rebuilt instantly. Hence the name: to pivot means to turn around.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Sum of Amount | Column Labels | ||||
| 2 | Row Labels | Laptop | Monitor | Printer | Grand Total | |
| 3 | Bukhara | 17 000 000 | 9 600 000 | 26 600 000 | ||
| 4 | Samarkand | 8 500 000 | 12 000 000 | 20 500 000 | ||
| 5 | Tashkent | 25 500 000 | 9 600 000 | 6 400 000 | 41 500 000 | |
| 6 | Grand Total | 51 000 000 | 21 600 000 | 16 000 000 | 88 600 000 | |
| 7 |
When you need a PivotTable and when a formula is enough
- PivotTable — lots of data (hundreds or thousands of rows), questions keep changing, and you need the result sliced different ways: by region, month, manager.
- Formula (SUMIFS, COUNTIFS) — the report layout is fixed, the result feeds other formulas, or it must update the moment the data changes.
- Both — explore quickly with a PivotTable, then lock the number you need into a permanent report with a formula.
In short: in a PivotTable, the answer to a new question is not a new formula but one drag.
Is your data ready for a PivotTable? 5 rules
1
One header row. Every column has a name, names don’t repeat, and there are no merged cells. If a column header is empty, Excel refuses to create the PivotTable with “The PivotTable field name is not valid”.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Date | Region | 1 | Amount | |
| 2 | 15.01.2025 | Tashkent | Aziz | 25 500 000 | |
| 3 | 20.02.2025 | Samarkand | Dilnoza | 12 000 000 | |
| 4 | |||||
| 5 |
2
No blank rows or columns. If you click a single cell and create a PivotTable, Excel treats everything up to the first blank row as the table — sales below it never reach the report.
3
One row — one record. Don’t spread months across columns (January, February, March…). The right way is one Date column and one Amount column; the PivotTable will produce the months itself.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | January | February | March | |
| 2 | Tashkent | 25 500 000 | 6 400 000 | 9 600 000 | |
| 3 | Samarkand | 12 000 000 | 8 500 000 | ||
| 4 | |||||
| 5 |
4
One data type per column. Only numbers in Amount, only real dates in Date. Even one text or blank cell can spoil the result (see the warning below).
5
No subtotal rows. The source must not contain rows like “Total” or “Tashkent total” — the PivotTable treats them as ordinary sales and adds them again. Totals are the PivotTable’s job.
Pro level: how a PivotTable works under the hood
When you create a PivotTable, Excel copies the source data into a pivot cache and builds the report from that copy. Three important consequences:
- Change the source and the PivotTable does not update by itself — you need Refresh (Alt + F5).
- Several PivotTables built from the same source share one cache: the file stays small, but grouping is shared between them too.
- If you click a PivotTable cell while typing a formula, Excel inserts
=GETPIVOTDATA("Amount";$A$3;"Region";"Tashkent")instead of=A1. This formula finds the number by its labels even when the layout changes.
Not sure which layout to pick? Вставка → Рекомендуемые сводные таблицы — Excel suggests several ready-made PivotTables for your data.
Try it in the simulator
Check the PivotTable with a formula. Type =СУММЕСЛИМН($D$2:$D$8;$A$2:$A$8;F2) in G2 and fill it down to G4. The results must match the PivotTable: Bukhara — 26600000, Tashkent — 41500000.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Region | Product | Qty | Amount | Region | Total | ||||||||||||||||||
| 2 | Tashkent | Laptop | 3 | 25500000 | Bukhara | |||||||||||||||||||
| 3 | Samarkand | Monitor | 5 | 12000000 | Samarkand | |||||||||||||||||||
| 4 | Tashkent | Printer | 2 | 6400000 | Tashkent | |||||||||||||||||||
| 5 | Bukhara | Laptop | 2 | 17000000 | ||||||||||||||||||||
| 6 | Samarkand | Laptop | 1 | 8500000 | ||||||||||||||||||||
| 7 | Tashkent | Monitor | 4 | 9600000 | ||||||||||||||||||||
| 8 | Bukhara | Printer | 3 | 9600000 | ||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 | ||||||||||||||||||||||||
| 11 | ||||||||||||||||||||||||
| 12 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.