How to Use GETPIVOTDATA to Retrieve Monthly PivotTable Values in Excel
Question details
The user needs to retrieve specific data, such as monthly sales figures for various suppliers, from an existing PivotTable into a different worksheet using dynamic formulas.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Extracting specific and dynamic data from a PivotTable to build customized reports across different worksheets.
- Observed behavior
- To accurately pull data from the PivotTable by using the GETPIVOTDATA function with dynamic cell references for criteria (e.g., suppliers and months) instead of hardcoded text strings.
Ensure that your source PivotTable is fully updated and that the 'Generate GetPivotData' feature is enabled in your PivotTable options so the formula can be auto-generated.
Auto-Generate and Customize the GETPIVOTDATA Formula
The easiest and most accurate way to use GETPIVOTDATA is to let the software generate the formula automatically, then replace the fixed text values with dynamic cell references.
By replacing literal criteria (like a specific month or supplier name) with cell references, you can easily drag and copy the formula to apply to other rows and columns in your custom report.
Select the destination cell in your blank worksheet where you want the data to appear, and type an equals sign (=).
Navigate to the worksheet containing your PivotTable and click on the exact value cell you want to retrieve (e.g., the sales value for 'Amazon' in 'March'). Press Enter.
Click on your destination cell again and look at the Formula Bar at the top. You will see a complete GETPIVOTDATA formula generated automatically.
In the formula, highlight the hardcoded text criteria (such as "Amazon" or "March 2024") and click on the cells in your new worksheet that contain those labels (e.g., B15 or C1). Lock the references with absolute referencing ($) as needed, then press Enter.

Enable the Generate GetPivotData Feature
If clicking a PivotTable cell simply returns a standard cell reference (like =C4) instead of the GETPIVOTDATA function, you need to enable the generation feature.
Easily Manage PivotTables and Data with WPS Spreadsheet
WPS Spreadsheet fully supports the GETPIVOTDATA function and advanced PivotTable features, allowing you to seamlessly analyze and extract data from your reports. It provides a familiar interface for managing large datasets efficiently.
- 1. Open your report in WPS Spreadsheet: Launch WPS Office and open your existing spreadsheet containing the source PivotTable and your custom report layout.
- 2. Auto-generate the formula: In your custom report sheet, type '=' in the destination cell, switch to the PivotTable sheet, and click the target data cell to automatically build the GETPIVOTDATA formula.
- 3. Make criteria dynamic: Edit the generated formula in the formula bar to replace static text names with your row or column headers, enabling easy formula dragging across your entire report.

Frequently Asked Questions
Why does my GETPIVOTDATA formula return a #REF! error?
A #REF! error typically occurs if the specific combination of criteria you are looking for (e.g., a specific supplier in a specific month) does not exist in the PivotTable, or if the referenced field is currently hidden/collapsed in the PivotTable. You can use the IFERROR function to catch this error and display a 0 instead.
How can I stop Excel from automatically generating GETPIVOTDATA formulas?
If you prefer standard cell references (like =C5) when referencing PivotTable data, you can turn off this feature. Click inside your PivotTable, navigate to the PivotTable Analyze tab on the ribbon, click the drop-down arrow next to Options, and uncheck 'Generate GetPivotData'.
Can I use GETPIVOTDATA to pull data into a completely different workbook?
Yes. As long as both workbooks are open, you can start your formula in the destination workbook, type an equals sign, switch to the source workbook containing the PivotTable, and select the data cell. However, the source workbook must remain open for the data to update correctly.




