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

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
Asked:
dddw
  • 2
  • 2
1 Solution
 
Saqib Husain, SyedEngineerCommented:
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
 
barry houdiniCommented:
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
 
dddwAuthor Commented:
I'm using 2003.  
0
 
barry houdiniCommented:
OK, in that case I recommend Saqib's approach, add another check to the SUMPRODUCT formula

regards, barry
0
 
dddwAuthor 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.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now