Hi,
I was able to use TJ's code from this post perfectly for only one value and one pivot table.
However, now I need to update multiple pivot tables - all with the same filters/pages - in different spreadsheets.
The spreadsheet with the values that should change the filter is "Setup" and then I have about 5 other spreadsheets all with pivot tables, and two other sheets with the data feeding the pivot tables.
This is what I have:
Any suggestions in what I could do? (I'm a beginner at coding.... ;-)Sub Apply_Name_Filter() Dim pvtTable As PivotTable Dim pvtField As PivotField Dim pvtItem As PivotItem Dim filterName As String Set pvtTable = Worksheets("PIVOT-Sheet2").PivotTables("PivotTable1") Set pvtField = pvtTable.PivotFields("Name") filterName = Worksheets("Setup").Range("B8") For Each pvtItem In pvtField.PivotItems If pvtItem.Value = filterName Then pvtField.CurrentPage = filterName Exit For End If Next pvtItem End Sub
Thanks!
Last edited by kriskrispies; 12-15-2010 at 08:54 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks