SOLVED

Excel function to capture columns of pivot table values?

Contributor

Hello,

I am aware of the GETPIVOTDATA function in Excel, but, as far as I can tell, it can only grab a value from a particular cell in a given Pivot Table.  Is there a way to copy a whole area of Pivot Table values (like multiple rows within a column(s)), rather than just one cell at a time?  I'm trying to avoid having to manage multiple cells with GETPIVOTDATA formulas in them.

 

Thank you! 

4 Replies
best response confirmed by PatDools (Contributor)
Solution

@PatDools 

You can use the INDEX and MATCH functions together to capture columns of Pivot Table values in Excel.

Here’s how:

  1. Select the cell where you want to display the first value from your Pivot Table.
  2. Type =INDEX( in the formula bar and select the range of cells that contains your Pivot Table data.
  3. Type ,MATCH( and select the cell that contains the column heading for the data you want to capture.
  4. Type ,0) to complete the formula.

This will return the first value from your Pivot Table column.

To capture multiple values, you can copy this formula down to other cells in the same column.

 

Here’s an example:

Let’s say you have a Pivot Table with the following data:

Region

Sales

East

$100

West

$200

North

$300

South

$400

To capture the values in the “Sales” column, you would use the following formula in cell B2:

=INDEX($A$2:$B$5,MATCH($A2,$A$2:$A$5,0),2)

This formula will return the value in the “Sales” column for the region listed in cell A2.

To capture the values for other regions, you can copy this formula down to other cells in column B.

 

I hope this helps! 

Hi @PatDools 

 

With Excel 2021/365 (PivotTable DataSource is an Excel table named Order

SampleOne.png

Thank you - this does the trick!
I am glad that you were helped here in the forum.
I wish you continued success with Excel!