tbablue
Active Member
- Joined
- Apr 29, 2007
- Messages
- 488
- Office Version
- 365
- Platform
- Windows
Hi Forum,
Some help req'd with passing a variable to a pivot filter.
How would I amend the following code such that PivotItems("99999") could be replaced by the value from a cell - a named range, [CandID_Picker]? The Pivot Table needs to filter on CandID_Picker - and nothing else.
With Activesheet.PivotTables("CandID_Picker_table").Pivotfields("CandID")
.ClearAllFilters
.PivotItems("99999").Visible = True
End With
Any help appreciated.
Some help req'd with passing a variable to a pivot filter.
How would I amend the following code such that PivotItems("99999") could be replaced by the value from a cell - a named range, [CandID_Picker]? The Pivot Table needs to filter on CandID_Picker - and nothing else.
With Activesheet.PivotTables("CandID_Picker_table").Pivotfields("CandID")
.ClearAllFilters
.PivotItems("99999").Visible = True
End With
Any help appreciated.