• Status: Solved
• Priority: Medium
• Security: Public
• Views: 239

Sumproduct

The below formula is returning a number but it should be 0.  Please see attached test file.  The cell in yellow is the one I'm having problems with.  It seems to be counting blank cells as 0.

=SUMPRODUCT((Responses!\$A\$2:\$A\$1000=\$B7)*(Responses!\$B\$2:\$B\$1000=L\$4))

Any help would be greatly appreciated!

Thanks.
test.xls
0
dddw
• 2
• 2
1 Solution

EngineerCommented:
The easiest way it to enter the zero as a text (precede it with an apostrophe).

This modified formula may do the trick

=SUMPRODUCT((Responses!\$A\$2:\$A\$1000=\$B7)*(Responses!\$B\$2:\$B\$1000=L\$4)*(LEN(Responses!\$B\$2:\$B\$1000)>0))

0

Commented:
Which version of Excel are you using? If you have Excel 2007 or later try COUNTIFS

=COUNTIFS(Responses!\$A\$2:\$A\$1000,\$B7,Responses!\$B\$2:\$B\$1000,L\$4)

regards, barry
0

Author Commented:
I'm using 2003.
0

Commented:
OK, in that case I recommend Saqib's approach, add another check to the SUMPRODUCT formula

regards, barry
0

Author Commented:
Thank you!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.