GETPIVOTDATA Function
Pulls a specific value out of a PivotTable by field and item.
Category
Lookup & Reference
Available in
All versions, Microsoft 365
Returns
A value from a PivotTable
Overview
GETPIVOTDATA reads a number from a PivotTable using names instead of cell positions. Because it asks for 'Sales for East' rather than 'cell C7', it keeps working when the pivot is rearranged or refreshed.
Excel writes this formula automatically when you type = and click a value inside a PivotTable.
Syntax
Arguments
| Argument | Required? | What it does |
|---|---|---|
| data_field | Yes | The value field name, in quotes, e.g. "Sales". |
| pivot_table | Yes | Any cell inside the PivotTable. |
| field1, item1, … | Optional | Pairs of field names and items that describe the value you want. |
Examples
Example 1 — Total sales for one region
A PivotTable starting in A3 shows Sales by Region.
| A | B | C | D | |
|---|---|---|---|---|
| 3 | Region | Sum of Sales | East | |
| 4 | East | 900 | 900 | |
| 5 | West | 625 | ||
| 6 | Grand Total | 1525 |
Example 2 — Driving it from a cell
Replace the hard-coded item with a cell so a dropdown controls the result.
Common mistakes
- #REF! errors. The item isn't visible in the pivot (filtered out, or the field was removed).
- Dates and numbers as items. Pass real dates/numbers, e.g. DATE(2026,1,1), not text that looks like one.
Notes

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.