Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default countif function using dates

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")


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default countif function using dates

Try it this way:

=COUNTIF(M3:M158,"30/09/2007")- COUNTIF(M3:M158,"=01/11/2007")

Hope this helps.

Pete

On Oct 12, 10:20 pm, 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")



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default countif function using dates

=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")


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default countif function using dates

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")




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default countif function using dates

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")







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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")





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default countif function using dates

=SUM(COUNTIF(M3:M158,{"30/09/2007","31/10/2007"})*{1,-1})
Revised for the date format

And, for the month of January :

=SUMPRODUCT(--(TEXT(M3:M45,"m/yyy")="1/2007"))


"bpsco_yip" wrote:

=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")





  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default countif function using dates

It worked! Thanks very much Pete.

"Pete_UK" wrote:

Try it this way:

=COUNTIF(M3:M158,"30/09/2007")- COUNTIF(M3:M158,"=01/11/2007")

Hope this helps.

Pete

On Oct 12, 10:20 pm, 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")




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Countif Function for dates in a range Mbanker Excel Worksheet Functions 2 August 22nd 07 11:21 PM
A week of dates and counting them using the COUNTIF function with contingencies j razz Excel Worksheet Functions 8 March 22nd 07 12:19 AM
CountIF with dates Secret Squirrel Excel Discussion (Misc queries) 13 November 15th 06 09:08 PM
Need help on countif and sumif function with dates and wildcard characters chinita_jill Excel Discussion (Misc queries) 5 July 19th 06 05:22 PM
COUNTIF using Dates WLMPilot Excel Worksheet Functions 1 October 7th 05 12:51 AM


All times are GMT +1. The time now is 12:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"