Condensed-do-all SUMPRODUCT?

fun2excel4money

New Member
Joined
Dec 24, 2016
Messages
18
Hello Community,

Long time lurker, first time poster. I am attempting to make a more concise formula. The situation is as follows:


JOHNJIMJESSMOD-1MOD-2MOD-3MOD-4MOD-5
ORD.5.3.2ORDORDAVGORDAVG
AVG.2.3.51000020000300004000050000
CA350003000035000CA10000004000050000
NY1000060004000NY020000000
VT260002100023000VT0030000400000

<tbody>
</tbody>

In this scenario, I am focusing on B5 where the output is 35000. I am attempting to find A5 in table F5:F7. Once I find it, I want it to sum up the amounts in G5:G7 using a SUMPRODUCT. The extra bone that I want to throw in is that I then want to specifically sum up all items that are ORD and all that are AVG in G2:K2. I want the numbers to then multiply by the person's ORD percentage in B2:D3.

To illustrate with numbers, CA has a total ORD modification of 50000 and a total AVG modification of 50000. As it relates to John, his ORD % is 50% and his AVG % is 20%. His share of ORD and AVG modifications would be 50000 * .5 + 50000 * .2, or 35000.

The formula I am currently using for B5 is:

=SUMPRODUCT(($F$5:$F$7=$A5)*($G$2:$K$2=$G$2)*$G$5:$K$7)*SUMPRODUCT(($A$2:$A$3=$G$2)*B$2:B$3)+SUMPRODUCT(($F$5:$F$7=$A5)*($G$2:$K$2=$I$2)*$G$5:$K$7)*SUMPRODUCT(($A$2:$A$3=$I$2)*B$2:B$3)

I am looking for a formula that might allow me to use one SUMPRODUCT as opposed to the sum of two SUMPRODUCTs. The actual situation I have, I am using five additional SUMPRODUCT, hence my curiosity of the situation. The problem I am having is that each person has his own percentages and is referenced directly above where I want to enter the formula. G2:K2 are used to let me know which modification is subject to which allocation, but not the allocation percentages attributable to the person.

Please let me know if there is anything I can clarify. A virtual eggnog to those who can help! Thank you!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
In B5 enter, copy across to D5, and down:

=SUMPRODUCT(INDEX($G$5:$K$7,MATCH($A5,$F$5:$F$7,0),0),SUMIFS(B$2:B$3,$A$2:$A$3,$G$2:$K$2))
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,016
Members
448,936
Latest member
almerpogi

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