Counting the number cells between two dates

D

Dave

Hi guys,

Hope someone can help with this, I'm pretty sure it'll be quite a simple one.

Column A:A contains a list dates, I want to use a formula to count the
number of cells which contain a date between 01/01/05 - 31/01/05.

Any ideas,

Many thanks,
Dave
 
J

Jason Morin

Try:

=SUMPRODUCT((A1:A1000>=--"1/1/05")*(A1:A1000<=--
"1/31/05"))

BTW - I'm using American date formats in mine.

HTH
Jason
Atlanta, GA
 
D

Dave Peterson

One way:

=COUNTIF(A:A,">="&DATE(2005,1,1))-COUNTIF(A:A,">"&DATE(2005,1,31))
or if you can use less than the whole column:

=SUMPRODUCT(--(TEXT(A1:A999,"yyyymm")="200501"))
 
Top