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
  1. Prepare your data
  2. Create the pivot table
  3. Drag fields
  4. Count, average, %
  5. Group dates
  6. Refresh
  7. Slicers
  8. FAQ

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:

ABCD
1DateRegionRepSales
2Jan 8NorthAnna1,200
3Jan 15SouthBen800
4Feb 3NorthChris950
5Feb 20EastDana450
6Mar 2SouthAnna700

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

  1. Click any cell inside your data.
  2. Go to Insert › PivotTable.
  3. 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:

  1. Drag Region to the Rows box.
  2. Drag Sales to the Values box.
AB
3Row LabelsSum of Sales
4East450
5North2,150
6South1,500
7Grand Total4,100

That's it: a report that would otherwise need a SUMIF per region. What each box does:

BoxDoes
RowsEach unique value becomes a row (Region: East, North, South).
ColumnsEach unique value becomes a column. Drag Rep here to see sales per region per rep.
ValuesThe numbers to calculate: a sum, count, average and so on.
FiltersA 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.