Need Help with Sumproduct

J

JHL

This formula works because I found it in this forum and have applied it. Now
I want to use it for 3 conditions, but my 3rd condition is also in the column
range of C3:C46, but the condition is H4.


=SUMPRODUCT(--($A$3:$A$46=F3),--($C$3:$C$46=H3),
--($C$3:$C$46=H4),$D$3:$D$46)


When I insert the additional c3:c46 into the formula, the result is $0,
instead of the sum I'm looking for. I need to keep these particular
conditions in col C.

Any suggestions on how to overcome this?

Thanks
 
B

Billy Liddel

Try
=SUMPRODUCT(--($A$3:$A$46=F3),--($C$3:$C$46=H3)+($C$3:$C$46=H4),$D$3:$D$46)

HTH
Peter
 
P

Paul C

The conditions --($C$3:$C$46=H3) and --($C$3:$C$46=H4) will exclude each
other unless H3=H4

without some more detail I cannot be certain of your intent, but I think you
may want two sumproduct formulas added together.

=SUMPRODUCT(--($A$3:$A$46=F3),--($C$3:$C$46=H3),$D$3:$D$46) +
SUMPRODUCT(--($A$3:$A$46=F3),--($C$3:$C$46=H4),$D$3:$D$46)

This will total all values in D3:D46 where A=F3 and C=H3 or C=H4
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top