I have a pivot table that looks like (i.e. there are three entries in the "ROWS" field in the user interface).
I know that I can get all categories, subcategories, and subcategories by doing (in VBA) PT.PivotFields(3).PivotItems() , PT.PivotFields(2).PivotItems() and PT.PivotFields(1).PivotItems() respectively, where PT is my variable.
How do I know which subcategories are in each category, as well as for subcategories in the categories?
I tried using PT.PivotFields(3).PivotItems()(1).ChildItems() , but I get the error <Unable to get the ChildItems property of the PivotItem class> and the same for try ParentItem .
Any idea how I can do this?
An example of what I'm looking for. Take the pivot table below and list (in some way) that:
a has subcategories d, e; b has subcategories e, f; c has subcategories d, e, f; and that would be the same if there were several levels in the column position. 
source share