ActiveSheet.PivotTables("Rank Hospital Pivot").PivotFields("GroupInd").CurrentPage = Range("SelectGroupInd").Value
So I have drop down boxes on the front page of my excel sheet and want to filter pivot tables that the data is read from based on these drop down boxes.
All the drop downs which reference page fields in the pivot table are easily switched, it is the row fields which are giving me trouble.
Based on the drop down, only one rowfield value can be selected so I need to change the pivot table from showing all of the values in the row field at once to showing just one of the values in the row field. I was thinking I could find a way in VBA to hide all values in the row field and then show the one (out of about 10k) that I want to show (hiding 9,999 doesn't sound ilke the right approach).
Is there an easy way to do this or another way to do this? I want to avoid hiding rows manually in the VBA and would rather directly address the pivot field, just to keep my extraneous formulas on the same sheet stable.
Thanks!
So I have drop down boxes on the front page of my excel sheet and want to filter pivot tables that the data is read from based on these drop down boxes.
All the drop downs which reference page fields in the pivot table are easily switched, it is the row fields which are giving me trouble.
Based on the drop down, only one rowfield value can be selected so I need to change the pivot table from showing all of the values in the row field at once to showing just one of the values in the row field. I was thinking I could find a way in VBA to hide all values in the row field and then show the one (out of about 10k) that I want to show (hiding 9,999 doesn't sound ilke the right approach).
Is there an easy way to do this or another way to do this? I want to avoid hiding rows manually in the VBA and would rather directly address the pivot field, just to keep my extraneous formulas on the same sheet stable.
Thanks!