How to List details of Calculated Items and the Groups used in a Pivot Table using VBA
Dear Forum,
I found a code on the Internet which gives the information of the various fields in a Pivot Table as well as the Calculated Field in a Tabular Form, I tried researching for the information on Groups in a Pivot Table and Calculated Items but didn't find any code.Can some please help me with the same. I want to create a Table of Information of the existing Pivot Tables in Sheet with all the details including the Groups in a Pivot Table as well as the Calculated Field.
In Groups , I have come across different Groups which we do normally , example certain Country Names i.e Text Values can be categorized as Continents , likewise certain Plain Numbers can be divided into groups using a Fixed Difference and the last one I know is that of Dates which can be grouped in Years Months and Quarters. SO I need to capture the information in a pivot table of any of these Groups which are used in the Pivot Table.
Also, if there is a Calculated Item, capture the information of the Pivot Table Calculated Item along with the Formula and the Position and the Items used.
I am attaching a Sample Data where someone can help me with the code
I have 2 Groups one Group is Based on the Sales Column and the other is Dates.
In the Sheet Data+Pivot I have a Pivot Table which has a Calculated item with the Name - 2Mon
Bookmarks