+ Reply to Thread
Results 1 to 4 of 4

Find multiple selections values in Pivottable.Pagefields using VBA

  1. #1
    Registered User
    Join Date
    05-31-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    27

    Exclamation Find multiple selections values in Pivottable.Pagefields using VBA

    Hello All,

    I have a pivot table with a page field which can have multiple values. For example the page field "Fruits" can have multiple selections as "Apple" and "Orange"

    Now if I am going to parse the structure of the pivot table using VBA, where can I field the values "Apple" and "Orange" stored within pivottable.pagefields.

    I goto pivottable.pagefield.datarange.formula, but it says "Multiple Items". I want to se which property does it keep those multiple items under.

    Please help. Thanks.

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474

    Re: Find multiple selections values in Pivottable.Pagefields using VBA

    You can loop through each PivotItem within the PivotItems collection for the PageField...

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-11-2013
    Location
    NJ
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Find multiple selections values in Pivottable.Pagefields using VBA

    Faddydaddy,

    Where you able to find the solution to your question? I am trying to find the values of a multiple select in a page field and the above code display ALL values from the field.

  4. #4
    Registered User
    Join Date
    06-29-2012
    Location
    RI
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Find multiple selections values in Pivottable.Pagefields using VBA

    Sorry to revive what appears to be an ancient thread, but I was just working on something similar. It's actually pretty easy to output the items to a list on another sheet within the loop that was already provided above.

    Please Login or Register  to view this content.
    For the purposes of my report, I'm calculating some additional items along side the pivot table that it cannot handle, so each time my user modifies the page items, the additional formulas attached to the side of the pivot will also update accordingly. This way the user is none-the-wiser where the pivot ends, and the other items begin.

    Hope this helps someone.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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