How do I count cells in Excel between date values?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to count the number of records in a colum by looking at the date and
counting between date values for example count records (cells) between Jan 1
2003 and Dec 31 2004. I have used the CountIF function and can make it work
on >1/1/2003 for example but I cannot work out how to include < (i.e. between
dates)
 
I want to count the number of records in a colum by looking at the date and
counting between date values for example count records (cells) between Jan 1
2003 and Dec 31 2004. I have used the CountIF function and can make it work
on >1/1/2003 for example but I cannot work out how to include < (i.e. between
dates)

=COUNTIF(A:A,">=1/1/2003")-COUNTIF(A:A,">12/31/2004")

or, if not in the US, better might be:

=COUNTIF(A:A,">="&DATE(2003,1,1))-COUNTIF(A:A,">"&DATE(2004,12,31))


--ron
 
=SUMPRODUCT(--(A1:A100>=--("2004/01/01")),--(A1:A100<=--("2004/12/31")))

or

=SUMPRODUCT(--(A1:A100>=B1),--(A1:A100<=C1))

if you store the dates in B1 and C1
 
Using COUNTIF for this can be a pain. How about
SUMPRODUCT?

=SUMPRODUCT(--(A1:A100>="1/1/03"+0),--
(A1:A100<="12/31/04"+0))

HTH
Jason
Atlanta, GA
 

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

Back
Top