Excel tutorial
/

PivotTables

Intermediate

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.

Книга1 - Excel
—☐✕
A1fxDate
ABCDEFG
1DateRegionManagerProductQtyAmount
215.01.2025TashkentAzizLaptop325 500 000
320.02.2025SamarkandDilnozaMonitor512 000 000
410.04.2025TashkentMalikaPrinter26 400 000
505.05.2025BukharaJavohirLaptop217 000 000
618.07.2025SamarkandDilnozaLaptop18 500 000
722.08.2025TashkentAzizMonitor49 600 000
812.11.2025BukharaJavohirPrinter39 600 000
9
Готово
Source data: one row is one sale. PivotTables work with exactly this kind of “long” table

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.

Книга1 - Excel
—☐✕
B4fx41500000
ABCD
1Row LabelsSum of Amount
2Bukhara26 600 000
3Samarkand20 500 000
4Tashkent41 500 000
5Grand Total88 600 000
6
Готово
Tashkent — 41,500,000 UZS: three sales were added up automatically, regions are sorted A to Z

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.

Книга1 - Excel
—☐✕
B5fx25500000
ABCDEF
1Sum of AmountColumn Labels
2Row LabelsLaptopMonitorPrinterGrand Total
3Bukhara17 000 0009 600 00026 600 000
4Samarkand8 500 00012 000 00020 500 000
5Tashkent25 500 0009 600 0006 400 00041 500 000
6Grand Total51 000 00021 600 00016 000 00088 600 000
7
Готово
Product moved to columns: now you see every region/product combination. An empty cell means there were no such sales

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”.

Книга1 - Excel
—☐✕
C1fx
ABCDE
1DateRegion1Amount
215.01.2025TashkentAziz25 500 000
320.02.2025SamarkandDilnoza12 000 000
4
5
Готово
C1 has no header — this is exactly what triggers the error

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.

Книга1 - Excel
—☐✕
fx
ABCDE
1RegionJanuaryFebruaryMarch
2Tashkent25 500 0006 400 0009 600 000
3Samarkand12 000 0008 500 000
4
5
Готово
Awkward layout: each month is a separate column, so the PivotTable sees three unrelated fields

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.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1RegionProductQtyAmountRegionTotal
2TashkentLaptop325500000Bukhara
3SamarkandMonitor512000000Samarkand
4TashkentPrinter26400000Tashkent
5BukharaLaptop217000000
6SamarkandLaptop18500000
7TashkentMonitor49600000
8BukharaPrinter39600000
9
10
11
12
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

58 / 154