Home Privacy Policy Feedback Link to us Site Map Forums

Excel: GetPivotData Example #2 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 the sheet called "Pivot Table". We've set up a named range called team_count that references this pivot table ('Pivot Table'!$A:$C).


=GetPivotData (team_count,"'Team 1' 'Count of B'") would return 1
=GetPivotData (team_count,"'Team 2' 'Count of B'") would return 3
=GetPivotData (team_count,"'Team 2' 'Count of C'") would return 12