+ Reply to Thread
Results 1 to 6 of 6

Sync pivot slicers from different database by vba

  1. #1
    Registered User
    Join Date
    08-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Sync pivot slicers from different database by vba

    Hi there,


    I have 2 pivot tables from different sources with slicers. Is that possible to have a VB code to sync the slicers (i.e., select in slicer A, and slicer B will automatically follow it )?


    Have a sample attachment as well.

    It has 2 lead slicers, and also 2 follow slicers, if anyone could help with the sync between the lead and follow slicers, I would highly appreciate it.


    Thanks,


    Stanley
    Attached Files Attached Files

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Sync pivot slicers from different database by vba

    Do you wish that the lead slicers control everything or that any slicer can be used? For the second option we may dispense with the follow slicers.

  3. #3
    Registered User
    Join Date
    08-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Post Re: Sync pivot slicers from different database by vba

    Quote Originally Posted by Izandol View Post
    Do you wish that the lead slicers control everything or that any slicer can be used? For the second option we may dispense with the follow slicers.

    Hi, thanks for your reply. Actually I only want lead slicers(for users) to control everything. Hope it's not too hard to achieve..

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Sync pivot slicers from different database by vba

    You may delete the follow slicers and then right-click the worksheet tab, choose View Code and add this code to your code window:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Sync pivot slicers from different database by vba

    Quote Originally Posted by Izandol View Post
    You may delete the follow slicers and then right-click the worksheet tab, choose View Code and add this code to your code window:
    Please Login or Register  to view this content.


    Wow, thanks, that works very well!! But just one more thing: I noticed that you have a code "On Error Resume Next" to deal with missing items in follow slicers, but I am wondering is there any other ways to handle the missing slicer items? I have tried the code in my dashboard, but the thing is there is no next item in the following slicers. Not sure whether I explained it clearly, but I have attached the new sample which shows my situation.
    Attached Files Attached Files

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Sync pivot slicers from different database by vba

    I suggested to delete the follow slicers - the code therefore manipulates the pivot filter fields and not the slicers. If you wish the follow slicers to remain the code must be changed.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Use combobox value to filter Pivot Table like slicers using VBA
    By limalf in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-17-2013, 07:31 PM
  2. Can you have pivot table fields as slicers?
    By no.18shirt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-20-2013, 05:12 PM
  3. RESOLVED: Working with Slicers - Pivot charts
    By uimhirADo in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-29-2013, 04:13 PM
  4. Can you have pivot table fields as slicers?
    By no.18shirt in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-19-2013, 10:39 AM
  5. Replies: 2
    Last Post: 05-24-2013, 03:58 PM

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