How to filter multiple pivot tables at the same time?

k'rsten Posted messages 9 Status Member -  
k'rsten Posted messages 9 Status Member -
Hello,

I need your help with Excel.
I have about ten pivot tables on the same sheet, each having the same filters and sub-filters (in the pivot table filter area).
Is it possible, with just a few clicks, to modify all the filters of my pivot tables?
For example, I have filters ranging from f1 to f10 and sub-filters ranging from sf1 to sf10 for each pivot table. I would like to quickly filter all of my pivot tables on f3 and sf4 (for example). Is this possible?

Thank you for your help; such an operation would save me a lot of time!!

Have a great day
Configuration: Windows XP Internet Explorer 6.0

6 answers

  1. pépé35530 Posted messages 2951 Registration date   Status Member Last intervention   1 390
     
    I found this on a site:

    Well, I think I found the solution to my problem.

    Here is the code:

    Sub MAJ_Niveau_Dim_Agence()

    '*********************
    ' This macro applies the agency from the first Pivot Table (MasterPivotTable) to all
    other Pivot Tables on a page
    '*********************

    Dim VarEtabl As String
    VarEtabl =
    ThisWorkbook.ActiveSheet.PivotTables("MasterPivotTable").PivotFields("[Agence]").CurrentPageName
    ' the variable VarEtabl corresponds to the name of the agency in MDX format
    '******************

    ActiveSheet.PivotTables(1).PivotFields("[Agence]").CurrentPageName = VarEtabl
    ' We apply the name of the agency in MDX format to all Pivot Tables on the page
    '******************
    End Sub

    I hope this can help someone else.
    Stan

    See you later

    pépé
    1