I have a Pivot table which I want to add a column to the end (right of the Grand Total column which sums up the values for specific columns in the pivot table. Example: My Pivot table comprises of 7 columns. I need to add the values from columns B, C, & F. The order of the columns can change, so I would like to sum them using the column heading. For Example: Column B is "New" this week, but, next week "New" might be positioned in Column C.
So, basically I need to add a column to the right of the pivot table that sums the values in columns "New", "Analyze", and "Development" no matter which column the data is located in.
I tried adding a calculated field to the Pivot table, but, just could not get it to work as desired. I currently have a MACRO that creates the Pivot Table, so thinking I can add to the code to create the total column once the Pivot table is created. Just need to know how to make this happen.
1. Identify the last column in the Pivot Table to determine the first column to the right
2. Identify the values I want summed based on the column heading in the Pivot Table rather than the column reference as they may change
All help is greatly appreciated. I tried to explain things different ways in order to help someone understand what I am trying to achieve.
So, basically I need to add a column to the right of the pivot table that sums the values in columns "New", "Analyze", and "Development" no matter which column the data is located in.
I tried adding a calculated field to the Pivot table, but, just could not get it to work as desired. I currently have a MACRO that creates the Pivot Table, so thinking I can add to the code to create the total column once the Pivot table is created. Just need to know how to make this happen.
1. Identify the last column in the Pivot Table to determine the first column to the right
2. Identify the values I want summed based on the column heading in the Pivot Table rather than the column reference as they may change
All help is greatly appreciated. I tried to explain things different ways in order to help someone understand what I am trying to achieve.