HomePrivacy PolicyFeedbackLink to usSite Map

MS Excel: GetPivotData Example #1 in Excel 2003/XP/2000/97


In Excel 2003/XP/2000/97, the GetPivotData function returns data from a pivot table. It can retrieve summary data from a pivot table as long as the summary data is visible.

The syntax for the GetPivotData function is:

GetPivotData( pivot_table, name )

pivot_table is generally a named range that has been set up to point to the pivot table.

name is the name of the summary value that you wish to retrieve.


For example:

Let's take a look at an example.

Below we have an Excel spreadsheet that has a pivot table on Sheet2. We've set up a named range called PivotTable that references this pivot table (Sheet2!$A:$E).


=GetPivotData(PivotTable,"10249 Qty") would return 49
=GetPivotData(PivotTable,"10249 Price/unit") would return 61
=GetPivotData(PivotTable,"10249 Total_Cost") would return 1863.4
=GetPivotData(PivotTable,"10249 Tofu Total_Cost") would return 167.4