Inverting a data matrix with variable headings and calculating subtotals

hoons

New Member
Joined
May 17, 2011
Messages
1
Issue is this. I have a table where the rows are individual accounts (first column) entitled "port", in the second column are names used to combine various individual accounts entitled "portc". The next columns (up to 100), all have figures that I want totaled by the various combined accounts, so its up to 100 totals by column B.

The problem is that I download the file in this format, but in summing my totals I need to invert the data and bring it into a spreadsheet where the combined accounts "portc" are column headings and my data items (the "up to" 100 additional data items) become the rows.

In the target spreadsheet the labels (both my "portc" label and the labels for the "up to 100" items are hardcoded, so I need to have flexibility in reading the column headings of my original spreadsheet to locate the right column to calculate my subtotals (by portc).

I've tried arrays, various forms of sumifs, and a number of things with cell reference functions, but no luck.

Any Ideas?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,224,583
Messages
6,179,671
Members
452,937
Latest member
Bhg1984

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