Hello,
I have this code bellow that filter a pivot table based in one cell input. But I want to be able to select more than one filter in the pivot table.
Already tried to modify the range for more than one cell but didn't work... There's nothing on the web with an answer for that!
Dim PT As PivotTable
Set PT = Sheets("MySheet").PivotTables("MyPivot")
PT.PivotFields("MyField").CurrentPage = Sheets("MySheet").Range("D1").Value
Set PT = Nothing
Another thing: How do I make it run automatically? I tried to build a regular Private Sub with the code working but wasn't able with my macro knowledge.
I have this code bellow that filter a pivot table based in one cell input. But I want to be able to select more than one filter in the pivot table.
Already tried to modify the range for more than one cell but didn't work... There's nothing on the web with an answer for that!
Dim PT As PivotTable
Set PT = Sheets("MySheet").PivotTables("MyPivot")
PT.PivotFields("MyField").CurrentPage = Sheets("MySheet").Range("D1").Value
Set PT = Nothing
Another thing: How do I make it run automatically? I tried to build a regular Private Sub with the code working but wasn't able with my macro knowledge.