Nitin Suntwal
New Member
Very Good Morning Team,
Need your help on filtering pivot table.
I have created a pivot report. What I am looking in is everytime vba should select all the page filed items except the last one. Below is the code i am trying to figure it out with.
Sub asdfasf()
With Sheets("SalesPivot").PivotTables("PivotTable1").PageFields("OrderDate")
For i = 1 To .PivotItems.Count - 1
.PivotItems(.PivotItems(i).Name).Visible = True
Next i
End With
End Sub
Attached is the file for your reference. Thanks for you help.
Need your help on filtering pivot table.
I have created a pivot report. What I am looking in is everytime vba should select all the page filed items except the last one. Below is the code i am trying to figure it out with.
Sub asdfasf()
With Sheets("SalesPivot").PivotTables("PivotTable1").PageFields("OrderDate")
For i = 1 To .PivotItems.Count - 1
.PivotItems(.PivotItems(i).Name).Visible = True
Next i
End With
End Sub
Attached is the file for your reference. Thanks for you help.