SUMPRODUCT with date functions

M

MCA

This is a formula that is close, but does not work ...
SUMPRODUCT((Sheet1!A2:A5555=(BETWEEN "09/01/2003"
AND "09/31/2003"))*(Sheet1!I1:I5555=Totals!C1)) . What I
would like is to check Sheet1 for a date range in column A
AND check Sheet1 for a value in column I and if both
criteria match, then count the number of instances that it
matches. I think my date range is set up wrong. Please
help.
 
P

Peo Sjoblom

One way

=SUMPRODUCT((Sheet1!A2:A5555>=DATE(2003,09,01))*(Sheet1!A2:A5555<=DATE(2003,
09,30)),
Sheet1!I2:I5555=Totals!C1)

note that September has only 30 days and that the ranges have to have the
same dimension (I1 in your example
has to be I2 if the dates start in A2)
 
P

Paul Corrado

MCA,

Either of these will give a count of the dates within a range of dates.
Adjust your cell references as needed. Also, you can change the
inequalities to <= or >= if you wish to include the start/end dates.

=COUNTIF(A1:A10,"<"&DATE(2003,9,23))-COUNTIF(A1:A10,"<"&DATE(2003,9,1))


=SUMPRODUCT((A1:A10<DATE(2003,9,23)*(A1:A10>DATE(2003,9,1)*(A1:A10))


PC
 
M

MCA

-----Original Message-----
This is a formula that is close, but does not work ...
SUMPRODUCT((Sheet1!A2:A5555=(BETWEEN "09/01/2003"
AND "09/31/2003"))*(Sheet1!I1:I5555=Totals!C1)) . What I
would like is to check Sheet1 for a date range in column A
AND check Sheet1 for a value in column I and if both
criteria match, then count the number of instances that it
matches. I think my date range is set up wrong. Please
help.

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top