Returns data stored in a PivotTable report. You can use GETPIVOTDATA to retrieve summary data from a PivotTable report, provided the summary data is visible in the report.
A reference to a cell in the PivotTable report that contains the data you want to retrieve. The pivot_table argument can be a cell or range of cells in the report, a name for the range that contains the PivotTable report, or a label stored in a cell above the PivotTable report.
A text string enclosed in double quotation marks that describes the cell in the PivotTable report that contains the value you want to retrieve. For example, if the PivotTable report contains one row field labeled Salesperson and you want to retrieve the grand total value for a salesperson named Davolio, name would be "Davolio." If the column field in the PivotTable report contains products and you want the grand total value of beverage sales for a salesperson named Davolio, then name would be "Davolio Beverages."
Calculated fields or items and custom calculations are included in GETPIVOTDATA calculations.
Assume the following PivotTable report is stored on a sheet, and the name PT1 refers to A2:E12, which is the range that contains the report.