+ Reply to Thread
Results 1 to 8 of 8

VBA code for linking multiple pivot tables

  1. #1
    Registered User
    Join Date
    09-01-2012
    Location
    Champaign, Illnois
    MS-Off Ver
    Excel 2007
    Posts
    20

    VBA code for linking multiple pivot tables

    I have 8 pivot tables all of which have a filter for choosing a company name. At present, I have to select the company name in every pivot table and I wanted to see if there was some VBA code to automate this so that when I choose the company name in one pivot table it automatically chooses the same name in the other 7. 4 of the tables are on one sheet and 4 on another although I could out them all on one if that would work.

    I did find the code on youtube posted by Debra Dalgleish at contextures.com but it doesn't seem to work on all tables, only some of them. For example, I choose a company name such as Music & Arts and some of the tables change and then others pick random names.

    Thanks

    Gary

  2. #2
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    881

    Re: VBA code for linking multiple pivot tables

    Gary can you post an example workbook where the code is not working for all the tables?

    John its not very helpful just posting
    Please Login or Register  to view this content.
    (unless you are trying to increase your post count)

    for your info the code Gary is referring to is in the link below

    http://blog.contextures.com/archives...one-selection/
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  3. #3
    Registered User
    Join Date
    09-01-2012
    Location
    Champaign, Illnois
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: VBA code for linking multiple pivot tables

    That is the code I am currently using. Since I'm new to this forum, what are the rules about posting examples?

    Thanks

    Gary

  4. #4
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    881

    Re: VBA code for linking multiple pivot tables

    No rules other than the file size. You just attach your file by clicking go advanced then click the button that looks like a paperclip. Browse for your file and click upload. See the link below.
    Obviously remove any confidential information.

    http://www.excelforum.com/faq.php?fa...b3_attachments

  5. #5
    Registered User
    Join Date
    09-01-2012
    Location
    Champaign, Illnois
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: VBA code for linking multiple pivot tables

    Here's a pdf showing that the dealer name in the first PT hasn't selected the same name in the other PT but random multiple names...should I deselect 'select multiple items'? Looking at the code from contextures and watching her video this should work as her example has multiple items too.

    Thanks

    Gary
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    881

    Re: VBA code for linking multiple pivot tables

    Gary, don't attach the files as PDF's as we can't work with them and you will find that most people have a tendency not to re-type the info themselves.
    Attach a copy of the actual workbook but again either remove or change any confidential information.

  7. #7
    Registered User
    Join Date
    09-01-2012
    Location
    Champaign, Illnois
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: VBA code for linking multiple pivot tables

    It's a very large file - 30MB so I couldn't post the file. I'll make a smaller version and post later.

    Thanks for the tips.

    Gary

  8. #8
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    881

    Re: VBA code for linking multiple pivot tables

    No problem I am going out soon but if others don't take a look I will try and remember to have a look tomorrow.

+ 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