ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Data tools
  3. GETPIVOTDATA in Excel: Pull Numbers From a Pivot Table

GETPIVOTDATA in Excel: Pull Numbers From a Pivot Table

By ExcelReady Team·Updated November 3, 2026·6 min read

The short answer

GETPIVOTDATA returns one value from a pivot table by naming what you want instead of pointing at a cell. For example, =GETPIVOTDATA("Sales",$A$3,"Region","North") returns North's total sales. Excel writes it automatically when you click a pivot cell in a formula. It keeps working when the pivot's layout changes, as long as the item is still shown.

Key takeaways

  • Syntax: =GETPIVOTDATA(data_field, pivot_table, [field1, item1], ...).
  • data_field is the value field's name in quotes; pivot_table is any cell inside the pivot.
  • Replace typed items with cell references to build a flexible report.
  • GETPIVOTDATA returns #REF! when the item isn't visible in the pivot or a name is misspelt.
  • To get a normal reference instead, type the cell address or turn off Generate GetPivotData.
On this page+
  1. What does GETPIVOTDATA do?
  2. GETPIVOTDATA syntax
  3. Example: pull one total from a pivot table
  4. Make GETPIVOTDATA flexible with cell references
  5. Turn off GETPIVOTDATA when you don't want it
  6. Why GETPIVOTDATA returns #REF!
  7. GETPIVOTDATA or SUMIFS?
  8. Practise it

GETPIVOTDATA in Excel pulls a single number out of a pivot table by naming it: "Sales for North, Laptop". Instead of pointing at a cell like B5, the formula describes the value, so it keeps working when the pivot is resized or rearranged. This guide is for anyone who builds reports or dashboards on top of pivot tables, or who has seen a long GETPIVOTDATA formula appear and wondered where it came from.

What does GETPIVOTDATA do?#

GETPIVOTDATA returns one value from a pivot table, chosen by field and item names. A field is a column from your source data, such as Region. An item is one value in that field, such as North.

It exists because pivot tables move. When you add a product, filter a region or refresh new data, the cell that held "North, Laptop" can shift to a different row. A plain reference like =B5 would then show the wrong number. GETPIVOTDATA finds the value by name, wherever it is.

You often meet it by accident. When you type = and click a cell inside a pivot table, Excel writes a GETPIVOTDATA formula for you instead of =B5.

GETPIVOTDATA syntax#

The function takes the value field, a cell in the pivot, and then pairs of field and item names:

Excel formula
=GETPIVOTDATA(data_field, pivot_table, [field1, item1], [field2, item2], ...)
ArgumentWhat it meansExample
data_fieldThe value field to return, in quotes"Sales"
pivot_tableAny cell inside the pivot table, usually its top-left cell$A$3
field1, item1A field name and the item you want, in pairs"Region","North"

You can add as many field and item pairs as the pivot has fields. With no pairs at all, GETPIVOTDATA returns the grand total. Field and item names are not case-sensitive.

Example: pull one total from a pivot table#

Here is a small sales list, the source data:

ABC
1RegionProductSales
2NorthLaptop4,800
3SouthMonitor1,250
4NorthMonitor900
5EastLaptop3,600
6NorthLaptop2,400
7SouthLaptop1,200
8EastMonitor1,500

A pivot table on another sheet, starting at A3, has Region in Rows, Product in Columns and Sum of Sales in Values:

Sum of SalesLaptopMonitorGrand Total
East3,6001,5005,100
North7,2009008,100
South1,2001,2502,450
Grand Total12,0003,65015,650

These formulas pull values from it:

QuestionFormulaResult
North, Laptop=GETPIVOTDATA("Sales",$A$3,"Region","North","Product","Laptop")7,200
All of North=GETPIVOTDATA("Sales",$A$3,"Region","North")8,100
All Monitors=GETPIVOTDATA("Sales",$A$3,"Product","Monitor")3,650
Grand total=GETPIVOTDATA("Sales",$A$3)15,650

If the formula sits on a different sheet from the pivot, the second argument includes the sheet name, such as Pivot!$A$3. The guide to referencing another sheet explains that syntax.

Make GETPIVOTDATA flexible with cell references#

Typed items like "North" lock the formula to one answer. Replace them with cells, and one formula can fill a whole report. Say F2:F4 hold East, North and South, and G1 holds Laptop. In G2:

Excel formula
=GETPIVOTDATA("Sales",Pivot!$A$3,"Region",$F2,"Product",G$1)

Fill it down and across. $F2 keeps the column fixed for regions, and G$1 keeps the row fixed for products. This is how many teams build a KPI summary: a neat, fixed layout that reads its numbers from a pivot underneath.

Dates need care. If a field holds real dates, give the item as a date value, such as DATE(2026,3,1), or as a cell that holds the date, not as typed text.

Turn off GETPIVOTDATA when you don't want it#

Sometimes you want a normal reference, for example to fill a formula down next to the pivot. GETPIVOTDATA doesn't adjust when filled, so every row would return the same value. There are two ways around it:

  1. Type the address. Typing =B5 by hand, instead of clicking the cell, gives a normal reference.
  2. Turn the feature off. On Windows, click inside the pivot, open the PivotTable Analyze tab, click the arrow next to Options and untick Generate GetPivotData. The same setting appears under File > Options > Formulas as "Use GetPivotData functions for PivotTable references". Excel for Mac has an equivalent setting, but its location depends on your version.

If you turn it off, remember that plain references can point at the wrong cell after the pivot changes shape.

Why GETPIVOTDATA returns #REF!#

GETPIVOTDATA returns #REF! when it can't find the value you described. The usual causes:

  1. The item isn't visible. If North is filtered out, or the Region field was removed from the pivot, the value doesn't exist to return.
  2. A name is misspelt. "Regoin" or "Nort" won't match. Copy names from the pivot's field list.
  3. The wrong data field. Use the source field name that Excel writes, such as "Sales", and check it is in the Values area.
  4. pivot_table points outside the pivot. The second argument must be a cell inside the pivot table.
  5. The data changed and the pivot wasn't refreshed. A new region won't appear until you refresh (Windows: Alt+F5 for the active pivot). See how to refresh a pivot table.

Wrap the formula in IFERROR, such as =IFERROR(GETPIVOTDATA(...),0), only once you know the #REF! is expected, for example for a product with no sales yet.

GETPIVOTDATA or SUMIFS?#

Both give the same totals. The choice is about where the numbers come from:

  • GETPIVOTDATA reads an existing pivot table. It's ideal when the pivot is already the agreed source, or when you need values shown as percentages from the pivot, such as percent of total.
  • SUMIFS reads the source data directly. =SUMIFS(C2:C8,A2:A8,"North",B2:B8,"Laptop") returns the same 7,200 with no pivot and no refresh.

SUMIFS is also a good check: if it matches your GETPIVOTDATA result, your pivot is up to date. The beginner's guide to pivot tables shows how to build the pivot used in this guide.

Practise it#

GETPIVOTDATA only makes sense once you are comfortable with pivot tables themselves. Try the SUMIFS check on this page, then build your first pivot table in a live spreadsheet and go further with report filters and percent-of-total views. Each step is checked instantly, so you'll know your pivot is right before you pull numbers from it.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

GETPIVOTDATA needs a real pivot table, so here is the SUMIFS check you would run against the source data. Click F2 and total Sales (C2:C8) for North and Laptop, then press Enter.

fx
ABCDEFG
1
Region
Product
Sales
2
North
Laptop
4800
North Laptop
3
South
Monitor
1250
4
North
Monitor
900
5
East
Laptop
3600
6
North
Laptop
2400
7
South
Laptop
1200
8
East
Monitor
1500
9
10
11

Tip: SUMIFS starts with the range to add (C2:C8), then the Region column with "North" and the Product column with "Laptop".

Practise this in a lesson

LessonPivot tables 1Build your first PivotTable on a new sheet: total sales by region, split them by product, then switch the summary from Sum to Count and Average and read the answer off the pivot.LessonPivot tables 2Go further with PivotTables: nest two row fields with subtotals, add a report filter, show values as a % of the grand total, update the source when new rows arrive, and know when SUMIFS is the better tool.

Frequently asked questions

Why does Excel put GETPIVOTDATA in my formula?

+

Excel writes GETPIVOTDATA automatically when you click a cell inside a pivot table while typing a formula. It does this so the formula keeps finding the same value if the pivot changes shape. You can type the cell address instead, or turn the option off.

How do I turn off GETPIVOTDATA in Excel?

+

On Windows, click inside the pivot table, open the PivotTable Analyze tab, click the arrow next to Options and untick Generate GetPivotData. The same setting is in File > Options > Formulas as Use GetPivotData functions for PivotTable references.

Why does GETPIVOTDATA return #REF!?

+

Usually the item you asked for isn't visible in the pivot, for example because it's filtered out or the field was removed, or a field or item name is misspelt. The pivot_table argument must also point to a cell inside the pivot.

Can I use a cell reference in GETPIVOTDATA?

+

Yes. Replace a typed item such as "North" with a cell such as F2. This lets one formula fill a whole report table.

Is GETPIVOTDATA better than SUMIFS?

+

It depends. GETPIVOTDATA reads a pivot table that already exists and follows it when the layout changes. SUMIFS works straight from the source data, needs no pivot and updates without a refresh.

Sources

  • Create a PivotTable to analyze worksheet data - Microsoft Support
  • SUMIFS function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What does GETPIVOTDATA do?
  2. GETPIVOTDATA syntax
  3. Example: pull one total from a pivot table
  4. Make GETPIVOTDATA flexible with cell references
  5. Turn off GETPIVOTDATA when you don't want it
  6. Why GETPIVOTDATA returns #REF!
  7. GETPIVOTDATA or SUMIFS?
  8. Practise it

Keep reading

Data tools· 5 min read

Pivot Tables in Excel: A Beginner's Guide

A pivot table summarizes a long table in a few clicks, without formulas. Click a cell in your data, choose Insert > PivotTable, and click OK to put it on a new sheet. Then drag fields into Rows, Columns and Values: Region in Rows and Sales in Values gives total sales for each region.

Projects· 6 min read

Build a Simple KPI Summary Sheet in Excel

A KPI summary sheet is a small block of formulas that reads a data table and shows the few numbers your manager asks about. Use SUMIFS for totals, COUNTIFS for counts, a ratio for rates and (new - old) / old for percent change. Put the month in one input cell so every KPI updates when you change it.

Data tools· 6 min read

How to Reference Another Sheet in Excel

To reference another sheet, type the sheet name, an exclamation mark, then the cell: =Prices!B3. If the name has a space, put single quotes around it: ='Last Year'!B5. The easiest way is to type =, click the other sheet's tab, click the cell and press Enter, and Excel writes the reference for you.

More on data tools

  • How to Highlight Blank Cells in Excel
  • Highlight Cells That Contain Specific Text
  • Find and Highlight Duplicates in Excel
  • Highlight an Entire Row Based on a Cell Value
  • Highlight the Top 10 Values in Excel
  • How to Make a Histogram in Excel
All data tools articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free