View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpsco_yip bpsco_yip is offline
external usenet poster
 
Posts: 1
Default countif function using dates

=SUM(COUNTIF(M3:M158,{"2007/9/30","2007/10/31"})*{1,-1})

"Teethless mama" wrote:

You're absolutely correct. For the month of January must have year included

=SUMPRODUCT(--(MONTH(M3:M158)=1),--(YEAR(M3:M158)=2007)


"Peo Sjoblom" wrote:

Will not work if the month is January and if there happens to be some blank
cells
included.


--


Regards,


Peo Sjoblom



"Teethless mama" wrote in message
...
=SUMPRODUCT(--(MONTH(M3:M158)=10))


"Cassidy1" wrote:

I want to calculate the number of entries in a column that are later than
one
date and earlier than another.
This is what I thought would work, but doesn't:
=COUNTIF(M3:M158,"30/09/2007"&"<01/11/2007")