Lookup & Reference All versions ◉ 3 views

=GETPIVOTDATA()

Returns a specific number from inside a PivotTable based on field and item names

=GETPIVOTDATA(data_field, pivot_table, [field1, item1, field2, item2], ...)
Hover argument names in the table for details.
Output typeMixed
Popularity45 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx — Coming soon ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =GETPIVOTDATA() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
📥 Download GETPIVOTDATA.xlsx — Coming soon ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

🧠 🧠 Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
data_field Text Required Name of the numeric field whose value you want
pivot_table Reference Required Address of one of the PivotTable cells
field1 Text Optional Name of the field to search by
item1 Any type Optional Desired item from that field

▣ Examples

Example 1 =GETPIVOTDATA("Sales", $A$3)
Example 2 =GETPIVOTDATA("Sales", $A$3, "City", G1)

✦ Tips

  • If you write a cell address instead of the item name, the formula becomes dynamic.
  • It only returns a number that is visible in the PivotTable; a filtered or collapsed item returns the #REF! error.
  • To stop Excel from writing this function automatically, in the PivotTable Analyze tab open the Options menu and uncheck Generate GetPivotData.
  • Field names must be written exactly like their headings in the PivotTable.

⚠ Common Errors

#REF! The written field or item does not exist or is not visible in the PivotTable (filtered or its group is collapsed)
Fix: Check the spelling of the names and that the item is shown in the PivotTable

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.