SUMPRODUCT and Blank Cells

imback2nite

Board Regular
Joined
Oct 30, 2004
Messages
203
Office Version
  1. 2003 or older
Platform
  1. Windows
Hello everyone and thank you for looking at this question. I’m using, or should I say, attempting to use SUMPRODUCT.
I’m trying to use this formula. The problem I’m having is there are blank cells in columns ‘A’, ‘B’, ‘C’ and the ‘D:AA’. How can I negate the blank cells?

=SUMPRODUCT(--(Finances!$D$36:$AA$1000)*(Finances!$A$36:$A$1000= Chart!$D$5)*(Finances!$B$36:$B$1000=Chart!$E$5)*(Finances!$C$36:$C$1000=Finances!$C$13))
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Perhaps this will do?
Excel Formula:
=SUMPRODUCT(IFERROR(--(Finances!$D$36:$AA$1000)*(Finances!$A$36:$A$1000= Chart!$D$5)*(Finances!$B$36:$B$1000=Chart!$E$5)*(Finances!$C$36:$C$1000=Finances!$C$13),0))
 
Upvote 0
@Anonymous1378
IFERROR was introduced with Excel 2007 I believe. In that case the OP's version in their profile would mean that they do not have access to that function.
 
Upvote 0
@imback2nite
  • What is the name of the sheet that this formula is on (even if the suggestion below works)

  • Blank cells should not cause a problem I think. Do you mean cells that contain formulas that return "" so that the cells look blank even though they are not?

  • Does this formula work for you?
Try
Excel Formula:
=SUMPRODUCT(IF(ISERROR(--(Finances!$D$36:$AA$1000)),0,--(Finances!$D$36:$AA$1000))*(Finances!$A$36:$A$1000= Chart!$D$5)*(Finances!$B$36:$B$1000=Chart!$E$5)*(Finances!$C$36:$C$1000=Finances!$C$13))
 
Upvote 0
I'm sorry. I should have specified. I'm using the dinosaur version. Excel 2003. With the new formula I'm getting a 0 instead of a correct sum.
The formula will reside on the Chart page. I do not get a "", at least not yet.
There are no blank cells ranging from $36 to $38 and I change the formula accordingly but I still get a 0 sum.
 
Upvote 0
The formula will reside on the Chart page.
Thanks. In that case you definitely should remove both references to the Chart sheet from your formula. It is not needed and can actually lead to incorrect results in some cases.

Here is a very small set of sample data that I tested with. Notice the column of 'null' formulas in column F

imback2nite.xlsm
ABCDEFG
13x
14
35
36a2x18 
37b3y23 
38a3y32 
39b3y41 
40a2x53 
41b2x63 
42
Finances
Cell Formulas
RangeFormula
F36:F41F36=""


Here is my suggested formula (with the Chart sheet names removed) in F5 and your original formula in G5. The result of my formula is the sum of the green cells above. Is that what you would be expecting?
If so, then it would seem that there is something different about the nature of your data compared to mine. As a starting point, to test the concept in your Excel version, open a brand new workbook and manually enter the values the same as mine then enter the F5 formula from below and see if you also get 17.

Also, you did not mention originally what was going wrong with your formula. Was it returning a #VALUE! error like below?

imback2nite.xlsm
DEFG
5a217#VALUE!
Chart
Cell Formulas
RangeFormula
F5F5=SUMPRODUCT(IF(ISERROR(--(Finances!$D$36:$AA$1000)),0,--(Finances!$D$36:$AA$1000))*(Finances!$A$36:$A$1000= $D$5)*(Finances!$B$36:$B$1000=$E$5)*(Finances!$C$36:$C$1000=Finances!$C$13))
G5G5=SUMPRODUCT(--(Finances!$D$36:$AA$1000)*(Finances!$A$36:$A$1000= Chart!$D$5)*(Finances!$B$36:$B$1000=Chart!$E$5)*(Finances!$C$36:$C$1000=Finances!$C$13))
 
Upvote 0
Not tested:

=SUMPRODUCT((0&Finances!$D$36:$AA$1000)*(Finances!$A$36:$A$1000= Chart!$D$5)*(Finances!$B$36:$B$1000=Chart!$E$5)*(Finances!$C$36:$C$1000=Finances!$C$13))
 
Upvote 0
I'm sorry. Still getting 0. And Phuoc, Thanks but now getting #VALUE error.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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