Forum Discussion

PatDools's avatar
PatDools
Brass Contributor
Apr 16, 2023

Excel function to capture columns of pivot table values?

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 Pi...
  • NikolinoDE's avatar
    Apr 17, 2023

    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! 

Resources