Sumproduct error formula

jazzista

Board Regular
Joined
Sep 15, 2014
Messages
86
Hello: I am having errors when trying to use sumproduct with 3 conditions: range of dates, categories & amounts. What I am doing wrong with the formulas? . Can somebody take a look at my file? I was able to use sumifs however, I wanted to know/learn why I am getting #values error when using the sumproduct function . See file attached

Thanks in advance for the help

https://www.dropbox.com/s/vubagihiw7in62a/sumprodct question.xlsx?dl=0
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
O4=SUMPRODUCT(($D$4:$D$23=$M4)*($C$4:$C$23>=$I$3)*($C$4:$C$23<=$J$3)*($E$4:$E$23)) copy down

O8=SUM(O4:O7)
 
Last edited:
Upvote 0
Marziotullio: Thank you very much for the elegant solution. What was I doing wrong? I am trying to understand the order of how sumproduct works. Thanks in advance!!
 
Upvote 0
[h=1]Excel Formula Efficiency 1: SUMPRODUCT function 12 Examples[/h]https://www.youtube.com/watch?v=O2ulQwMmlmY

[h=1]Slaying Excel Dragons Book #26 : SUMPRODUCT Function (12 Examples)[/h]https://www.youtube.com/watch?v=i4lEPYd1o18

look this tutorial

https://www.youtube.com/user/ExcelIsFun Mike Girvin tutorial everything on Excel
 
Upvote 0
What was I doing wrong?

You wrote:
--($C$4:$C$23&">="&$I$3) instead of --($C$4:$C$23>=$I$3).
(--$C$4:$C$23&"<="&J3) instead of --($C$4:$C$23<=J3)
(--$D$4:$D$23=M4) instead of --($D$4:$D$23=M4)

The minimum correction for your formula is:

=SUMPRODUCT(--($C$4:$C$23>=$I$3),--($C$4:$C$23<=J3),--($D$4:$D$23=M4),$E$4:$E$23)

PS.... That addresses the #VALUE error. Once that is corrected, we find another usage error: J3 instead of $J$3.

So, the minimum corrections are:

=SUMPRODUCT(--($C$4:$C$23>=$I$3),--($C$4:$C$23<=$J$3),--($D$4:$D$23=M4),$E$4:$E$23)

FYI, SUMIFS is more efficient, when you can use it.
 
Last edited:
Upvote 0
joeu2004: Thanks for the explanation. Yes... I agree: sumifs is more efficient however I wanted to try sumproduct. One other thing, I did not know that when using sumproduct you do not need the &" "& construction where as sumifs you do need it. Thanks again for solving/explaining my errors.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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