Sumproduct + sumifs array

Vbanoob98

Board Regular
Joined
Sep 13, 2019
Messages
128
Hi everyone,

So basically Im trying to use a sumifs formula to include 2 different arrays as conditions, it works perfectly when using 1 array, but as soon as I add a second one, I stop getting the results I want.

Ive attached the minisheet below, if someone can explain why its not working it would really help me out, thanks!



Book1
ABCDEFGHIJKLMNOP
1PartnerScenarioProbabilityTotalScenario ArrayProbability Array
2James1High10Scenario21High
3James2Medium30ProbabilityMedium2Medium
4James2High15Total40
5James1Medium8
6
7Expected
8Scenario2
9ProabilityMedium
10Total63
11
Sheet1
Cell Formulas
RangeFormula
I4I4=+SUMPRODUCT(SUMIFS(D2:D5,C2:C5,IF(I3="High",N2,N2:N3),B2:B5,IF(I2=1,M2,M2:M3)))
Cells with Data Validation
CellAllowCriteria
I2List=$M$2:$M$3
I3List=$N$2:$N$3
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
It has to do with how SUMIFS handles array variables for the parameters. SUMIFS can handle 1 vertical array (N2:N3) only. But it can also handle 1 vertical and 1 horizontal array:

=+SUMPRODUCT(SUMIFS(D2:D5,C2:C5,IF(I3="High",N2,N2:N3),B2:B5,IF(I2=1,M2,TRANSPOSE(M2:M3))))

You can convert M2:M3 from vertical to horizontal with the TRANSPOSE.


Edit: you can also use SUMPRODUCT without the SUMIFS:

=SUMPRODUCT(D2:D5,--ISNUMBER(MATCH(C2:C5,N2:N3,0)),--ISNUMBER(MATCH(B2:B5,M2:M3,0)))

You can use something like that to extend your formula to include other arrays.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,689
Members
449,117
Latest member
Aaagu

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