Excel - count the number of records between two specific dates.

D

DK

I need to count the number of records between two specific dates. Using
excel 2007. Can anyone help?
 
B

Bob Phillips

=SUMPRODUCT(--(A:A<=--"2008-01-01"),--(A:A>=--"2008-03-31"))

or if the dates are in other cells

=SUMPRODUCT(--(A:A<=M1),--(A:A>=M2))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
D

DK

Hi Bob

I'm obviously doing something wrong as it still doesn't work.

All data on one workhseet. Dates to be searched are in column K.
Dates from and to are in two seperate cells in different columns.

using the following formula
=SUMPRODUCT(--(K2:K500<=DD401), --(K2:K500>=DE401)) - typed exactly as shown
produces the result 0 but there is data that should have been counted. Any
further advice?
 
B

Bob Phillips

I got my <= and >= the wrong way around, did you also?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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