Good afternoon folks!
I have another tough question.
I have a PivotTable Report Filter that I want to Count the amount of selections in that filter preferably via VBA but a formula would work ok too.
So for a Person's Name, there's a filter under it for Dates and I'd like to be able to count the amount of Dates selected
Ex. I select Jan, Feb, Mar to filter the data by, the Count returns a value of 3
This is sort of what I want but it isn't working:
Sub DateCount()
MsgBox Worksheets("Sheet1").PivotTables("Name").PivotFields("Dates").PivotItems.Count
End Sub
I have another tough question.
I have a PivotTable Report Filter that I want to Count the amount of selections in that filter preferably via VBA but a formula would work ok too.
So for a Person's Name, there's a filter under it for Dates and I'd like to be able to count the amount of Dates selected
Ex. I select Jan, Feb, Mar to filter the data by, the Count returns a value of 3
This is sort of what I want but it isn't working:
Sub DateCount()
MsgBox Worksheets("Sheet1").PivotTables("Name").PivotFields("Dates").PivotItems.Count
End Sub