TheRedCardinal
Active Member
- Joined
- Jul 11, 2019
- Messages
- 250
- Office Version
- 365
- 2021
- Platform
- Windows
I have a very basic sub that refreshes 6 pivot tables on a sheet:
The refresh is needed because the data source (in all cases, the same table) gets bigger each month. It also includes some new variants in a column that is used as a filter.
The filter is set to exclude a single item, "Not Present" from the column "Issued" but once the refresh happens, any new items in the Issued column are also filtered out.
I am not sure how to reset the filters so everything is visible except for this single item.
Could anybody help?
VBA Code:
Sub RefreshPivots()
Dim WS1 As Worksheet, WBk1 As Workbook, PT As PivotTable
Set WBk1 = ThisWorkbook
Set WS1 = WBk1.Sheets("9 - Purchase Pivot Checks")
For Each PT In WS1.PivotTables
PT.RefreshTable
Next PT
End Sub
The refresh is needed because the data source (in all cases, the same table) gets bigger each month. It also includes some new variants in a column that is used as a filter.
The filter is set to exclude a single item, "Not Present" from the column "Issued" but once the refresh happens, any new items in the Issued column are also filtered out.
I am not sure how to reset the filters so everything is visible except for this single item.
Could anybody help?