Solved

Sumproduct

Posted on 2011-10-18
229 Views
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
Question by:dddw

LVL 43

Accepted Solution

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

LVL 50

Expert Comment

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 Comment

I'm using 2003.
0

LVL 50

Expert Comment

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

regards, barry
0

Author Closing Comment

Thank you!
0

Featured Post

Suggested Solutions

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.