← All functions

GETPIVOTDATA

Supported, behaves as documented

Category: Lookup and reference · Last tested 2026-09-01

Real compatibility results for the GETPIVOTDATA function: executed in Excel for the web, Google Sheets and LibreOffice Calc, with desktop Excel behavior from Microsoft’s official documentation (we do not run desktop Excel — Excel for the web is a different application and is executed separately). Syntax and links to that documentation are below.

Support matrix

EngineDocumentedLive-testedVerdict
Excel (desktop)Yes No — documented only n/a
Excel for the web— Yes (recalc, 2026-09-01) Supported, behaves as documented
Google SheetsYes Yes (Drive import, 2026-08-31) Supported, behaves as documented
LibreOffice CalcYes Yes (25.8.7.3, 2026-08-31) Supported, behaves as documented

LibreOffice version history

We executed the same test cases under each LibreOffice release to show exactly when GETPIVOTDATA’s support changed — not documentation claims, real results.

LibreOffice versionVerdictTested
24.2.0.3 Supported, behaves as documented 2026-08-31
24.8.7.2 Supported, behaves as documented 2026-08-31
25.2.0.3 Supported, behaves as documented 2026-08-31
25.8.7.3 Supported, behaves as documented 2026-08-31

Executed test cases

Excel for the web (executed 2026-09-01 via OneDrive recalculation)

These values come from Excel for the web, not from desktop Excel. They are two different implementations of the calculation engine, and this run measured only the web one: the corpus was uploaded to OneDrive as .xlsx, recalculated by Excel for the web on open, and downloaded again for readback. Excel for the web is a rolling service with no pinnable version, so the run is identified by its date. Where a value here disagrees with the Expected column — which is Microsoft’s documentation of the desktop product — we cannot tell you whether the web engine diverges from the desktop one or the documentation is wrong about both, because we do not run desktop Excel.

FormulaDescriptionResultExpectedVerdict
=GETPIVOTDATA("Sales",A1) The pivot_table argument points at an ordinary range, not a PivotTable #REF! #REF!
Provenance

Excel documents: "If the pivot_table argument is not a range in which a PivotTable is found, GETPIVOTDATA returns #REF!." A1 is the top-left of a plain data range that happens to have a "Sales" header -- a deliberately tempting target, because an engine that treats GETPIVOTDATA as a glorified lookup would find the column and return 100 or 600 instead of erroring. HARNESS LIMITATION, stated rather than worked around: Microsoft's GETPIVOTDATA examples all read from a PivotTable, and a PivotTable is a workbook feature that openpyxl cannot author -- it can neither build a pivot cache nor lay out a pivot range -- so none of the page's four value-returning examples ($5,534 / $5,534 / $2,876 / $309) can be reproduced by this harness at all. What CAN be executed faithfully is the branch the page documents for exactly this situation, and it is the one that matters for a compatibility corpus: what an engine does when GETPIVOTDATA is pointed somewhere that is not a PivotTable. A3:B4 here holds a plain two-column range of ordinary values -- headers Region / Sales and three data rows -- which is emphatically NOT a PivotTable. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GETPIVOTDATA("Sales",J20) The pivot_table argument points at an empty cell #REF! #REF!
Provenance

The same documented clause -- "If the pivot_table argument is not a range in which a PivotTable is found, GETPIVOTDATA returns #REF!" -- exercised against a blank cell rather than against populated data. Asserted separately because an engine can special-case emptiness (returning 0, or #N/A, or a blank) on the way to deciding there is no PivotTable. HARNESS LIMITATION, stated rather than worked around: Microsoft's GETPIVOTDATA examples all read from a PivotTable, and a PivotTable is a workbook feature that openpyxl cannot author -- it can neither build a pivot cache nor lay out a pivot range -- so none of the page's four value-returning examples ($5,534 / $5,534 / $2,876 / $309) can be reproduced by this harness at all. What CAN be executed faithfully is the branch the page documents for exactly this situation, and it is the one that matters for a compatibility corpus: what an engine does when GETPIVOTDATA is pointed somewhere that is not a PivotTable. A3:B4 here holds a plain two-column range of ordinary values -- headers Region / Sales and three data rows -- which is emphatically NOT a PivotTable. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GETPIVOTDATA("Sales",A1,"Region","North") The full field/item form, still pointed at an ordinary range #REF! #REF!
Provenance

The same documented clause, exercised through the optional field1/item1 arguments that the page describes as "1 to 126 pairs of field names and item names". This is the shape closest to a lookup -- "give me Sales where Region is North", which the plain range below can answer, and the answer would be 100 -- so it is the strongest test that an engine really requires a PivotTable rather than merely preferring one. HARNESS LIMITATION, stated rather than worked around: Microsoft's GETPIVOTDATA examples all read from a PivotTable, and a PivotTable is a workbook feature that openpyxl cannot author -- it can neither build a pivot cache nor lay out a pivot range -- so none of the page's four value-returning examples ($5,534 / $5,534 / $2,876 / $309) can be reproduced by this harness at all. What CAN be executed faithfully is the branch the page documents for exactly this situation, and it is the one that matters for a compatibility corpus: what an engine does when GETPIVOTDATA is pointed somewhere that is not a PivotTable. A3:B4 here holds a plain two-column range of ordinary values -- headers Region / Sales and three data rows -- which is emphatically NOT a PivotTable. Column F is untouched because this harness writes the formula under test into cell F1.

Matched

Google Sheets (executed 2026-08-31 via Drive import)

Google Sheets is a rolling service with no pinnable version, so this run is identified by its date. The corpus was imported to Drive as .xlsx, recalculated by Sheets, and exported back for readback.

FormulaDescriptionResultExpectedVerdict
=GETPIVOTDATA("Sales",A1) The pivot_table argument points at an ordinary range, not a PivotTable #REF! #REF!
Provenance

Excel documents: "If the pivot_table argument is not a range in which a PivotTable is found, GETPIVOTDATA returns #REF!." A1 is the top-left of a plain data range that happens to have a "Sales" header -- a deliberately tempting target, because an engine that treats GETPIVOTDATA as a glorified lookup would find the column and return 100 or 600 instead of erroring. HARNESS LIMITATION, stated rather than worked around: Microsoft's GETPIVOTDATA examples all read from a PivotTable, and a PivotTable is a workbook feature that openpyxl cannot author -- it can neither build a pivot cache nor lay out a pivot range -- so none of the page's four value-returning examples ($5,534 / $5,534 / $2,876 / $309) can be reproduced by this harness at all. What CAN be executed faithfully is the branch the page documents for exactly this situation, and it is the one that matters for a compatibility corpus: what an engine does when GETPIVOTDATA is pointed somewhere that is not a PivotTable. A3:B4 here holds a plain two-column range of ordinary values -- headers Region / Sales and three data rows -- which is emphatically NOT a PivotTable. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GETPIVOTDATA("Sales",J20) The pivot_table argument points at an empty cell #REF! #REF!
Provenance

The same documented clause -- "If the pivot_table argument is not a range in which a PivotTable is found, GETPIVOTDATA returns #REF!" -- exercised against a blank cell rather than against populated data. Asserted separately because an engine can special-case emptiness (returning 0, or #N/A, or a blank) on the way to deciding there is no PivotTable. HARNESS LIMITATION, stated rather than worked around: Microsoft's GETPIVOTDATA examples all read from a PivotTable, and a PivotTable is a workbook feature that openpyxl cannot author -- it can neither build a pivot cache nor lay out a pivot range -- so none of the page's four value-returning examples ($5,534 / $5,534 / $2,876 / $309) can be reproduced by this harness at all. What CAN be executed faithfully is the branch the page documents for exactly this situation, and it is the one that matters for a compatibility corpus: what an engine does when GETPIVOTDATA is pointed somewhere that is not a PivotTable. A3:B4 here holds a plain two-column range of ordinary values -- headers Region / Sales and three data rows -- which is emphatically NOT a PivotTable. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GETPIVOTDATA("Sales",A1,"Region","North") The full field/item form, still pointed at an ordinary range #REF! #REF!
Provenance

The same documented clause, exercised through the optional field1/item1 arguments that the page describes as "1 to 126 pairs of field names and item names". This is the shape closest to a lookup -- "give me Sales where Region is North", which the plain range below can answer, and the answer would be 100 -- so it is the strongest test that an engine really requires a PivotTable rather than merely preferring one. HARNESS LIMITATION, stated rather than worked around: Microsoft's GETPIVOTDATA examples all read from a PivotTable, and a PivotTable is a workbook feature that openpyxl cannot author -- it can neither build a pivot cache nor lay out a pivot range -- so none of the page's four value-returning examples ($5,534 / $5,534 / $2,876 / $309) can be reproduced by this harness at all. What CAN be executed faithfully is the branch the page documents for exactly this situation, and it is the one that matters for a compatibility corpus: what an engine does when GETPIVOTDATA is pointed somewhere that is not a PivotTable. A3:B4 here holds a plain two-column range of ordinary values -- headers Region / Sales and three data rows -- which is emphatically NOT a PivotTable. Column F is untouched because this harness writes the formula under test into cell F1.

Matched

LibreOffice Calc 25.8.7.3 (tested 2026-08-31)

FormulaDescriptionResultExpectedVerdict
=GETPIVOTDATA("Sales",A1) The pivot_table argument points at an ordinary range, not a PivotTable #REF! #REF!
Provenance

Excel documents: "If the pivot_table argument is not a range in which a PivotTable is found, GETPIVOTDATA returns #REF!." A1 is the top-left of a plain data range that happens to have a "Sales" header -- a deliberately tempting target, because an engine that treats GETPIVOTDATA as a glorified lookup would find the column and return 100 or 600 instead of erroring. HARNESS LIMITATION, stated rather than worked around: Microsoft's GETPIVOTDATA examples all read from a PivotTable, and a PivotTable is a workbook feature that openpyxl cannot author -- it can neither build a pivot cache nor lay out a pivot range -- so none of the page's four value-returning examples ($5,534 / $5,534 / $2,876 / $309) can be reproduced by this harness at all. What CAN be executed faithfully is the branch the page documents for exactly this situation, and it is the one that matters for a compatibility corpus: what an engine does when GETPIVOTDATA is pointed somewhere that is not a PivotTable. A3:B4 here holds a plain two-column range of ordinary values -- headers Region / Sales and three data rows -- which is emphatically NOT a PivotTable. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GETPIVOTDATA("Sales",J20) The pivot_table argument points at an empty cell #REF! #REF!
Provenance

The same documented clause -- "If the pivot_table argument is not a range in which a PivotTable is found, GETPIVOTDATA returns #REF!" -- exercised against a blank cell rather than against populated data. Asserted separately because an engine can special-case emptiness (returning 0, or #N/A, or a blank) on the way to deciding there is no PivotTable. HARNESS LIMITATION, stated rather than worked around: Microsoft's GETPIVOTDATA examples all read from a PivotTable, and a PivotTable is a workbook feature that openpyxl cannot author -- it can neither build a pivot cache nor lay out a pivot range -- so none of the page's four value-returning examples ($5,534 / $5,534 / $2,876 / $309) can be reproduced by this harness at all. What CAN be executed faithfully is the branch the page documents for exactly this situation, and it is the one that matters for a compatibility corpus: what an engine does when GETPIVOTDATA is pointed somewhere that is not a PivotTable. A3:B4 here holds a plain two-column range of ordinary values -- headers Region / Sales and three data rows -- which is emphatically NOT a PivotTable. Column F is untouched because this harness writes the formula under test into cell F1.

Matched
=GETPIVOTDATA("Sales",A1,"Region","North") The full field/item form, still pointed at an ordinary range #REF! #REF!
Provenance

The same documented clause, exercised through the optional field1/item1 arguments that the page describes as "1 to 126 pairs of field names and item names". This is the shape closest to a lookup -- "give me Sales where Region is North", which the plain range below can answer, and the answer would be 100 -- so it is the strongest test that an engine really requires a PivotTable rather than merely preferring one. HARNESS LIMITATION, stated rather than worked around: Microsoft's GETPIVOTDATA examples all read from a PivotTable, and a PivotTable is a workbook feature that openpyxl cannot author -- it can neither build a pivot cache nor lay out a pivot range -- so none of the page's four value-returning examples ($5,534 / $5,534 / $2,876 / $309) can be reproduced by this harness at all. What CAN be executed faithfully is the branch the page documents for exactly this situation, and it is the one that matters for a compatibility corpus: what an engine does when GETPIVOTDATA is pointed somewhere that is not a PivotTable. A3:B4 here holds a plain two-column range of ordinary values -- headers Region / Sales and three data rows -- which is emphatically NOT a PivotTable. Column F is untouched because this harness writes the formula under test into cell F1.

Matched

Docs & syntax