Question

Locked

Need Help with the SUMPRODUCT Function in Excel

By jdackerman ·
I am Having a issue with the SUMPRODUCT Function in Excel 2007. Here is my string and issue:

=SUMPRODUCT(($B$2:$B$800>DATE(2013,4,1))*($B$2:$B$800<DATE(2013,4,5)))

A B
1 4/1/2013
2 4/2/2013
3 4/2/2013
4 4/2/2013
5 4/2/2013
6 4/2/2013
7 4/4/2013
8 4/4/2013
9 4/4/2013
10 4/5/2013
11 4/5/2013
12 4/8/2013
13 4/8/2013
14 4/8/2013
15 4/8/2013
16 4/8/2013
17 4/9/2013
18 4/9/2013
19 4/9/2013
20 4/9/2013
21 4/9/2013

The Value returned is 8 even though the answer is 11. I cant seem to figure out what I am doing wrong. Can somebody please help me.

J

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Wrong Function...

by Sven2157 In reply to Need Help with the SUMPRO ...

I believe that you want to use COUNTIF(). This function takes 2 arguments:

COUNTIF( range, criteria )
range - is the cells that you want to include
criteria - is what you are looking to count

So you would want something more like( Using your example data above ):

=COUNTIF($B$2:$B$800,">4/1/2013")-COUNTIF($B$2:$B$800,"<4/5/2013")

*** EDIT ***
Upon posting I noticed that the LessThan symbol will not display in the second part of the function; just before the date 4/5/2013. I had to add the HTML Entity code in order for it to work.

Hope that helps! ;-)

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums