Sumproduct using one range criteria and one fixe cell

cstlaurent

Board Regular
Joined
Jan 14, 2005
Messages
182
HI am trying to use the sumproduct using two criteria, wich it's ok up to now. But when one of the criteria as took compare the data to a range it is not working. EX: =+Sumproduct((A2:A7=(A20:a24)*(B2:B7=B20)*(C2:C7)).
I am able to use an array formula.. sum(if(or(A2:A6=A20;A2:A6=A21; and so and so);if(B2:B6=B20;C2:C6))). But was hoping there will be a simpler way using a range instead of indicating cell by cell the comparaison with the sumproduct funciton :rolleyes:

thanks in advance (y)

20001 REG 7.5
20001 ADD OT
20001 REG 7.5
20002 REG 7.5
20003 REG 7.5


range Where
20001 REG
20003
and so
and so
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Unfortunately the Match Function doesn't seem to accept a range for the value to look into the search range.

It doesn't work.
 
Upvote 0
Maybe a slight tweak --

=SUMPRODUCT(--(ISNUMBER(MATCH(A2:A7,A20:A24,0))),--(B2:B7=B20),C2:C7)
 
Upvote 0
From the look of it your value column that is being summed contains text, ie the OT bit. SUMPRODUCT doesn't like that. Is that how your data is, a mixture of text and numbers?

Ken.........
 
Upvote 0
He the formula I have tried .

=+SUMPRODUCT((ISNUMBER(MATCH(A11:A15;A2:A7;0)))*(B2:B7=B10)*C2:C7)

When I remove the :)a15) it does work. The Match Value doesn't work with an array selection).

so far the only formla that is working is
=+SUMPRODUCT(OR((A2:A7=A11);A2:A7=A12)*(B2:B7=B11)*(C2:C7))

But I have place where I have 2 criteria and other 6. So I am trying to replace the (or((a2:A7=a11);a2:a7 = A12) by something that will compare the selected array to an criteria array.
 
Upvote 0
cstlaurent said:
He the formula I have tried .

=+SUMPRODUCT((ISNUMBER(MATCH(A11:A15;A2:A7;0)))*(B2:B7=B10)*C2:C7)

When I remove the :)a15) it does work. The Match Value doesn't work with an array selection).

so far the only formla that is working is
=+SUMPRODUCT(OR((A2:A7=A11);A2:A7=A12)*(B2:B7=B11)*(C2:C7))

But I have place where I have 2 criteria and other 6. So I am trying to replace the (or((a2:A7=a11);a2:a7 = A12) by something that will compare the selected array to an criteria array.

I think you've got 2 of the arguments reversed...

=+SUMPRODUCT((ISNUMBER(MATCH(A2:A7;A11:A15;0)))*(B2:B7=B10)*C2:C7)
 
Upvote 0

Forum statistics

Threads
1,215,327
Messages
6,124,290
Members
449,149
Latest member
mwdbActuary

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