+ Reply to Thread
Results 1 to 4 of 4

Single selection for multiple pivot tables vba

  1. #1
    Registered User
    Join Date
    02-10-2013
    Location
    UAE
    MS-Off Ver
    Excel 2010
    Posts
    26

    Question Single selection for multiple pivot tables vba

    Hi All,

    Sorry if I'm repeating an already reported question, but haven't found anything on the web and any help would be appreciated!

    I have two sets of data, which I cannot combine into one as they are at different levels. But they have a common column - Month. If I have two pivot tables (one from each of these data sets) with month in the Report Filter, how can I get it such that if the user selects January in the first pivot, it automatically selects January as the month in the second pivot as well?

    I used a worksheet_change event, but that didn't work out at all, probably coz of my coding skills Can someone provide correct code or another way to solve this issue?...thanx in advance!

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Single selection for multiple pivot tables vba

    Try something like this in the workbook code:
    Please Login or Register  to view this content.
    You will need to adjust for sheet names, pagefield name etc.
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  3. #3
    Registered User
    Join Date
    02-10-2013
    Location
    UAE
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Single selection for multiple pivot tables vba

    Thanx CC for your assistance, but I had got my worksheet_change event code to work and I went along with that. But I'll test the above as well for future reference. Thanks once again

  4. #4
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Single selection for multiple pivot tables vba

    That's fine, it's your project.
    I would only add that if you put the code (this, or an adjusted version of your own) in the workbook rather than the sheets you only need to maintain one set of code to trigger for either pivot change - the code itself is virtually identical regardless of location.

+ 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