+ Reply to Thread
Results 1 to 6 of 6

Extracting data from pivot table using getPivotData function

  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    Pune
    MS-Off Ver
    Excel 2007
    Posts
    23

    Extracting data from pivot table using getPivotData function

    Hi,

    Please find attached the excel file containing a pivot table (PivotTable1). From this table i need the list of projects in an excel macro.

    The expected output is -

    Proj1
    Proj2
    Proj3

    I was trying to acheive this using the getPivotData function, but no luck. Can someone please help me?

    Thanks,

    Shantanu Kulkarni
    Attached Files Attached Files

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Extracting data from pivot table using getPivotData function

    Hi Shantanu,

    If you look at the function.. GetPivotData, I have bolded Data part because this function fetches data not the row / column headings

    Alternatively, you can use below formula to get your desired output:-
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    08-16-2012
    Location
    Pune
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Extracting data from pivot table using getPivotData function

    Hi Dilip,

    Thanks for the response.

    My requirement also however is not to get the headers but the data within the header "project" and the same is not working with the getPivotData. Please refer to the expected output in my original comment.

    I will try the solution you have provided and come back. Till then if you could let me know if this is possible with the getPivotData it will be great.

    Thanks,

    Shantanu

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Extracting data from pivot table using getPivotData function

    Please refer to the expected output in my original comment.
    You original comment has below output listed as your expectation:-
    The expected output is -

    Proj1
    Proj2
    Proj3
    And these all are headers only i.e. Row Headings.. the item which you see in pivot as row headings and column headings are HEADERs and getpivotdata function can not fetch them, as per my knowledge. Thanks.



    Regards,
    DILIPandey
    <click on below * if this helps>

  5. #5
    Registered User
    Join Date
    08-16-2012
    Location
    Pune
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Extracting data from pivot table using getPivotData function

    Hi Dilip,

    Got your point now. Thanks.

    Does excel provide any other simple mechanism to extract the row headings? The solution that you provided earlier does work on a simple pivot but gets very complex when used with a complex pivot table.

    Thanks in advance.

    Shantanu

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Extracting data from pivot table using getPivotData function

    Treat the "complex pivot table" as "collection of columns" and I guess you need to extract information from any one " column " ... correct?

    Now either you can use my above formula OR you can look-up required column data based on some criteria... Hope this helps.. if not share a "complex pivot table" with your expected output. thanks.

    Regards,
    DILIPandey
    <click on below * if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1