Summing Multiple Intersections Based On Multiple Column/Row Titles

mysites

New Member
Joined
Jul 12, 2017
Messages
7
Hey Everyone,

I've been stewing on this one for so long my head is steaming. I need a hand.

I have a workbook with five worksheets. Tab One is my output tab and has a number of cells that require a formula. Tab Two is a mapping table that looks something like this:

ABC
1NameType
Group Mapping
2AyyVarianceGroup 1
3BeeSumGroup 1
4CeeSumGroup 3
5DeeSumGroup 3
6EeeVarianceGroup 3
7EffSumGroup 4

<tbody>
</tbody>

Tab Three is another mapping file:
AB
1NameCity Mapping
2OneChicago
3TwoChicago
4ThreeNew York
5FourDetroit
6FiveDetroit
7SixMiami

<tbody>
</tbody>


Tab Four is where my Variance Data sits.

ABC
DEF
1AyyBeeAyyDeeEee
2One1.0
2.03.04.05.0
3Two6.07.08.09.010.0
4Three11.012.013.014.015.0
5Three16.017.018.019.020.0
6Four21.022.023.024.025.0

<tbody>
</tbody>

Tab Five is where my Sum Data sits.

ABCDEF
1AyyBeeAyyDeeEee
2One100.0
200.0300.0400.0500.0
3Two600.0700.0800.0900.01000.0
4Three1100.01200.01300.01400.01500.0
5Three1600.01700.01800.01900.02000.0
6Four2100.02200.02300.02400.02500.0


<tbody>
</tbody>

On Tab One, my output tab, I need to sum together all of the intersections at Group 1 and Chicago (As well as 50+ other cells that contain some combination of Group and City, so hard-coding the mappings in the formula would not work for me). Members from Tab 2 with the Type of Variance need to be pulled from my Variance Tab, and those with the type of Sum need to be pulled from my Sum tab.

So I would expect the calculated value of my cell to equal 918 (18 from the Variance Tab plus 900 from the Sum tab).

I've tried creating a micro version of this formula using SUMPRODUCT, but I haven't been able to find a formula for SUMPRODUCT that takes multiple values as criteria. For instance: =SUMPRODUCT((A2:A5="Bee")*(B1:E1={"Three","Four"})*(B2:E5))

I receive #N/A when entering this formula for a single-table, small scale version of the functionality. Is there a way to pass a range to SUMPRODUCT? Or is this out of the capabilities of that function?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Of course, the above formula wouldn't work on my example tables because the rows and columns are swapped. If I were to try the formula on the table above, it would look like this: =SUMPRODUCT((A2:A5={"Three","Four"})*(B1:E1="Ayy")*(B2:E5))
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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