Skip to content
Google Sheets

GETPIVOTDATA function in Google Sheets

Extracts an aggregated value from a pivot table that corresponds to the specified row and column headings.

=GETPIVOTDATA(value_name, any_pivot_table_cell, [original_column, ...], [pivot_item, ...])

GETPIVOTDATA syntax and parameters

Four arguments, two required.

  • value_namestringRequired

    The name of the value in the pivot table for which you want to get data. value_name must be enclosed in quotation marks or be a reference to any cell containing the appropriate text. If there is more than one value field, you have to use the exact name that appears in the pivot table (For example, “SUM of Sales”).

  • any_pivot_table_cellrangeRequired

    Any reference to a cell in the desired pivot table (top corner recommended).

  • original_columnstringRepeating

    [ OPTIONAL ] - The name of the column in the source data set (not the pivot table).

  • pivot_itemstringRepeating

    [ OPTIONAL ] - The name of the row or column shown in the pivot table corresponding to original_column that you want to retrieve.

GETPIVOTDATA examples

Formulas you'll actually reuse.

  1. West region revenue from a pivot table, no matter where that row moves:

    =GETPIVOTDATA("Revenue", $A$3, "Region", "West")

    Result184250

  2. Narrow it down by two fields — Region and Quarter:

    =GETPIVOTDATA("Revenue", $A$3, "Region", "West", "Quarter", "Q3")

    Result48900

GETPIVOTDATA in Excel

Same name — your formula ports as-is.

Try GETPIVOTDATA in the playground

Edit the example — nothing to install.

Preloaded with the GETPIVOTDATA formula from Example 1 — change anything and watch it respond.

Loading the editor…

GETPIVOTDATA errors

What they mean — and the fixes.

  • #REF!

    A field or item name doesn't exist in the pivot table, or the anchor cell isn't inside it — names must match the pivot's headers exactly.