Home › Excel basics › Pivot tables
Pivot Table in Excel: Step-by-Step Guide for Beginners
A pivot table summarises a large list into a compact report: sales per region, orders per month, hours per project. You build it by dragging fields around, without writing a single formula, and you can rearrange it in seconds.
In this guide
Step 1: prepare your data
Pivot tables work on a simple list. Before you start, check that:
- The first row contains a header for every column. An empty header causes the error "The PivotTable field name is not valid".
- There are no empty rows or columns in the middle of the data.
- There are no merged cells and no subtotal rows inside the list.
- Each column holds one kind of data: dates in a date column, numbers in a number column.
We'll use this sales list:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Date | Region | Rep | Sales |
| 2 | Jan 8 | North | Anna | 1,200 |
| 3 | Jan 15 | South | Ben | 800 |
| 4 | Feb 3 | North | Chris | 950 |
| 5 | Feb 20 | East | Dana | 450 |
| 6 | Mar 2 | South | Anna | 700 |
Tip: turn the list into an Excel table first (click inside it and press Ctrl+T). The pivot table then includes new rows automatically when you refresh it.
Step 2: create the pivot table
- Click any cell inside your data.
- Go to Insert › PivotTable.
- Check the range Excel suggests, choose New Worksheet and click OK.
You'll see an empty pivot table on the left and the PivotTable Fields pane on the right, with a list of your column headers and four boxes: Filters, Columns, Rows and Values.
Step 3: drag fields into place
To see total sales per region:
- Drag Region to the Rows box.
- Drag Sales to the Values box.
| A | B | |
|---|---|---|
| 3 | Row Labels | Sum of Sales |
| 4 | East | 450 |
| 5 | North | 2,150 |
| 6 | South | 1,500 |
| 7 | Grand Total | 4,100 |
That's it: a report that would otherwise need a SUMIF per region. What each box does:
| Box | Does |
|---|---|
| Rows | Each unique value becomes a row (Region: East, North, South). |
| Columns | Each unique value becomes a column. Drag Rep here to see sales per region per rep. |
| Values | The numbers to calculate: a sum, count, average and so on. |
| Filters | A dropdown above the table to filter the whole report, for example by date. |
Step 4: change the calculation
Numbers are summed by default. To change that, right-click a number in the pivot table and choose Summarize Values By:
- Count: the number of sales per region instead of the total.
- Average: the average sale per region.
- Max / Min: the largest or smallest sale.
Choose Show Values As › % of Grand Total to see each region's share: North would show 52.44%.
Group dates by month or quarter
Drag Date to Rows. Newer Excel versions group dates into months automatically. If not, right-click a date in the pivot table, choose Group, and select Months, Quarters and/or Years.
Refresh after changing the data
A pivot table does not update by itself when the source data changes. Right-click the pivot table and choose Refresh, or press Alt+F5. Ctrl+Alt+F5 refreshes every pivot table in the workbook. If you added rows below the original range and didn't use a table, change the range via PivotTable Analyze › Change Data Source.
Filter with slicers
Slicers are clickable filter buttons. Click inside the pivot table and choose PivotTable Analyze › Insert Slicer, then pick a field like Region. Clicking a button filters the report instantly, which makes pivot tables great for simple dashboards.
Frequently asked questions
Why doesn't my pivot table update?
Pivot tables only update when you refresh them. Right-click the table and choose Refresh, or press Alt+F5.
Why does my pivot table show "Count of" instead of "Sum of"?
The column contains text or empty cells, so Excel counts instead of sums. Fix the data so the column contains only numbers, or change the calculation via Summarize Values By › Sum.
What does "The PivotTable field name is not valid" mean?
One of the columns in your source range has an empty header. Give every column a name and try again.
Can I use a pivot table to remove duplicates?
A pivot table shows each value in the Rows area only once, so it's a quick way to see a list of unique values. For a formula-based list, use UNIQUE.