Enter Calculated field in Pivot Table

dougebowl

Board Regular
Joined
Feb 22, 2010
Messages
60
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.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top