Rayne
asked on
pivot filter - not dynamic!
Hello
I just recorded a macro - but don’t find it dynamic.
There is a pivot table that has a pivot filter. Now if you press the button, it reset to certain pivot filter values. If you see the macro-
it basically turns on all the field values >>
ActiveSheet.PivotTables("P ivotTable1 ").PivotFi elds("Regi on").Curre ntPage = _
"(All)"
and then switches off all the remaining values. >>
With ActiveSheet.PivotTables("P ivotTable1 ").PivotFi elds("Regi on")
.PivotItems("West").Visibl e = False
.PivotItems("(blank)").Vis ible = False
End With
This code is not at all dynamic and everytime the data changes, I have to adjust it? This is not dynamic. How do I accomplish the same goal by just telling the vba code to selectively filter for a set of values (Central and East) - ?
issuePlease.xlsm
I just recorded a macro - but don’t find it dynamic.
There is a pivot table that has a pivot filter. Now if you press the button, it reset to certain pivot filter values. If you see the macro-
it basically turns on all the field values >>
ActiveSheet.PivotTables("P
"(All)"
and then switches off all the remaining values. >>
With ActiveSheet.PivotTables("P
.PivotItems("West").Visibl
.PivotItems("(blank)").Vis
End With
This code is not at all dynamic and everytime the data changes, I have to adjust it? This is not dynamic. How do I accomplish the same goal by just telling the vba code to selectively filter for a set of values (Central and East) - ?
issuePlease.xlsm
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER