Hi,
I am trying to count the amount of items visible on screen for a row field in a pivot table. I am doing this:
CategoryAmount = ActiveSheet.PivotTables("YTDTrendPivot").RowFields("Cost Buckets").VisibleItems.Count
This, however, shows me the list of items available in the dropdown list for "Cost Buckets", but not the amount of items actually shown on screen. The table has a list of months down the columns and when I only select the first three months then some of the 13 Cost Buckets will disappear because there are no data rows for it.
I have searched and searched but can't find a way to count the items actually VISIBLE on the screen within the pivot table, not the amount of items shown when you select the "Cost Bucket" dropdown.
Appreciate anyone's help.
Andy.
I am trying to count the amount of items visible on screen for a row field in a pivot table. I am doing this:
CategoryAmount = ActiveSheet.PivotTables("YTDTrendPivot").RowFields("Cost Buckets").VisibleItems.Count
This, however, shows me the list of items available in the dropdown list for "Cost Buckets", but not the amount of items actually shown on screen. The table has a list of months down the columns and when I only select the first three months then some of the 13 Cost Buckets will disappear because there are no data rows for it.
I have searched and searched but can't find a way to count the items actually VISIBLE on the screen within the pivot table, not the amount of items shown when you select the "Cost Bucket" dropdown.
Appreciate anyone's help.
Andy.