countif within date ranges

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

Guest

Im trying to count the number of entries for every month from a list of cells.
I've got the basic count if function but how do i tell it to count every
entry for jan 07?
Should i no be using countif?

Thanks
 
=SUMPRODUCT(--(YEAR(A2:A20)=2007),--(MONTH(A2:A20)=1))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
=countif(a:a,">="&date(2007,1,1)) - countif(a:a,">"&date(2007,1,31))

Count the days larger than or equal to than Jan 1, 2007 and then subtract the
number of days larger than Jan 31, 2007.
 
Thanks bob but i cant get it to work im getting the #value! error and i dont
understand why...heres what im working with...

Date requested
01/01/07
02/01/07
01/02/07
02/02/07
31/12/06

raised in jan07 =
raised in feb 07 =
 
Works fine for me naz. Are the cells formatted as text? Is there an error in
one of the cells?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
yup it was the format..many thanks

Bob Phillips said:
Works fine for me naz. Are the cells formatted as text? Is there an error in
one of the cells?

--
HTH

Bob

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

Dave Peterson said:
=countif(a:a,">="&date(2007,1,1)) - countif(a:a,">"&date(2007,1,31))

Count the days larger than or equal to than Jan 1, 2007 and then subtract the
number of days larger than Jan 31, 2007.
 

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