How to Use a Pivot Table in Excel (Step by Step)
To create a pivot table in Excel, select your data, click Insert → PivotTable → New Worksheet, then drag fields into the Rows, Columns, Values, and Filters areas to summarize them instantly. A pivot table condenses thousands of rows into a clean summary you can rearrange with a drag — no formulas, no manual sorting, and no risk of leaving a row out.
What a pivot table is (and why it beats manual work)
A pivot table is a summary view built from a source range. You choose which fields to group by and which numbers to total, and Excel rebuilds the summary every time you move a field.
Compare that to manual analysis. Sorting rows in Excel only puts records in order — it doesn’t add them up. Subtotaling or writing a SUMIF formula works, but you rebuild the formula for every category and update it by hand when the data changes. A pivot table does all of that from one source range and recalculates in a click.
Step by step: create your first pivot table
For this walkthrough, imagine a sales export with the columns Date, Region, Product, and Revenue — about 2,000 rows.
- Click a single cell anywhere inside your data. Make sure there are no blank columns or rows inside the block.
- Go to Insert → PivotTable. Excel highlights the range it detected.
- Confirm the range and choose New Worksheet, then click OK.
- The PivotTable Fields pane appears on the right, listing every column header.
If your data is a proper Excel Table (Ctrl + T), the pivot expands automatically as you add rows — a big time-saver covered in the pitfalls table below.
The four areas, explained
Drag a field name from the top of the pane into one of the four boxes at the bottom.
| Area | What it does | Example |
|---|---|---|
| Rows | Lists unique values down the left side | Region down the page |
| Columns | Spreads a second field across the top | Month across the page |
| Values | The numbers being summarized | Sum of Revenue |
| Filters | A report-level filter for the whole pivot | Filter to one year |
Sales by region × month
To build the example report: drag Region into Rows, Month into Columns, and Revenue into Values. Excel builds a grid with one row per region, one column per month, and a grand total — the exact “sales by region by month” view most managers ask for.
Change the summary: Sum, Count, Average
Excel guesses the calculation from the data type: Sum for numbers, Count for text. To change it:
- Right-click any value cell in the pivot.
- Choose Summarize Values By.
- Pick Sum, Count, Average, Max, Min, or Product.
For more control — such as renaming the header or applying a number format — use Value Field Settings instead.
The “Count instead of Sum” gotcha
If a revenue column shows Count rather than Sum, Excel thinks those cells are text, not numbers. This usually happens when figures are imported with currency symbols, apostrophes, or spaces baked in. A pivot can only count text.
To fix it: select the source column, use Data → Text to Columns → Finish to coerce the values back to numbers, then right-click the pivot value → Summarize Values By → Sum and refresh.
Show values as percentages or running totals
The Values area can do more than sum. Right-click a value → Show Values As and choose:
- % of Grand Total — each cell as a share of the overall figure.
- % of Column Total — each region as a share of that month.
- Running Total In — a cumulative figure across a date field.
This turns an absolute grid into a contribution report without adding a single formula.
Group dates into months, quarters, or years
If your Rows field is a date, Excel often groups it automatically. If it doesn’t:
- Right-click any date label inside the pivot.
- Choose Group.
- Select Months, Quarters, and Years — you can pick several at once.
- Click OK.
Excel adds the grouped levels to the Rows area, and you can drag them to reorder — Year outside, Month inside, for example. It’s the fastest way to turn a daily list into a monthly trend.
Sort and filter inside a pivot
- Sort: open the drop-down arrow on a Row or Column label and choose Sort A to Z, Sort Z to A, or More Sort Options — for example, sort regions by total revenue descending instead of alphabetically.
- Filter: the same drop-down has checkboxes for the values you want, plus Label Filters and Value Filters (for example, show only regions with revenue above $50,000).
Add a slicer for one-click filtering
A slicer is a floating set of buttons that filters the pivot — much faster than opening drop-downs during a meeting.
- Click inside the pivot table.
- Go to PivotTable Analyze → Insert Slicer.
- Tick the field you want to filter by (for example, Product) and click OK.
- Click a button in the slicer to filter instantly; hold Ctrl to select several.
The same menu offers Insert Timeline, which gives you a date slider for time-based filtering.
Refresh after the source data changes
Pivot tables don’t update themselves when you edit the source. After adding or changing rows:
- Click inside the pivot and press Refresh on the ribbon, or
- Press Ctrl + Alt + F5 to refresh every pivot in the workbook at once.
If new rows were added outside the original range, click PivotTable Analyze → Change Data Source and reselect the range — or convert the source to an Excel Table so it expands automatically.
Common pitfalls
| Symptom | Cause | Fix |
|---|---|---|
| New rows don’t appear | Source range is fixed and didn’t grow | Change Data Source, or use an Excel Table (Ctrl + T) |
| Value shows Count, not Sum | Numbers stored as text | Text to Columns → Finish, then re-sum |
| Blank row or “(blank)” appears | Empty cells in the source | Clean the source, or filter blanks out |
| Total is wrong after edits | Pivot not refreshed | Refresh (Ctrl + Alt + F5) |
| A field is missing from the pane | Column header is blank | Add a header to every column, then refresh |
Pivot tables are the building block for a full dashboard - see how to make a dashboard in Excel.
FAQ
What is a pivot table used for?
Summarizing large datasets — totals by category, averages, counts, and cross-tabs — without writing formulas. It’s Excel’s fastest analysis tool.
What’s the difference between a pivot table and VLOOKUP?
A pivot table aggregates many rows (sums, averages). VLOOKUP looks up a single value. They’re complementary — one summarizes a dataset, the other retrieves a record from it.
Can I make a pivot table in Google Sheets?
Yes — the same concept, via Insert → Pivot table. The layout is nearly identical to Excel’s, and fields drag into Rows, Columns, Values, and Filter the same way.
Why is my pivot table showing “Count” instead of “Sum”?
Numbers formatted as text get counted, not summed. Convert the source column to real numbers with Text to Columns, then refresh the pivot table.
Does a pivot table update automatically?
No. Press Ctrl + Alt + F5 (Refresh All) after editing the source. Build the source as an Excel Table and new rows are picked up automatically the next time you refresh.
Related guides
Google Sheets Formulas for Beginners (10 You Need to Know)
The 10 essential Google Sheets formulas every beginner needs — SUM, AVERAGE, COUNT, IF, and more, with working examples.
How to Add Checkboxes in Google Sheets (Tick Boxes)
Add checkboxes in Google Sheets with Insert → Checkbox, set custom checked/unchecked values, and count ticks with COUNTIF or a progress bar.
How to Create a Drop-Down List in Excel (Data Validation)
Add a drop-down list in Excel with Data Validation — pick from a typed list or a range on another sheet, and fix the errors that stop it working.