Perfom calculations on rows based on column header names

mperry76

New Member
Joined
Sep 28, 2005
Messages
20
I'm trying to calculate some ratios based on numbers in pivot columns. My issue is that when the users filter the pivot, the columns in the pivot change based on what is available for that filter, of course. So the pivot might have 10 columns of data when unfiltered, but only 4 columns when filtered, etc. Therefore my manual calculations (which I have in columns to the right of the pivot) need to be refreshed each time the user filters the pivot.

I've tried inserting calculated fields in the pivot. It works fine for the base records but the issue is that the subtotals in the pivot are not calculating according to the formula. The subtotals in the calculated fields simply add up (sum) the ratios in the field, instead of calculating the ratio, if that makes sense.

Is there a quick fix someone can suggest?

Thanks a lot,
Matt
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
In fact, I figured it out. I used a simple SUMIF formula on the column headers and the rows, so that even if the column headers change columns because the filter is on, the calculations still work.
 
Upvote 0

Forum statistics

Threads
1,224,520
Messages
6,179,267
Members
452,902
Latest member
Knuddeluff

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