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 counting multiple dates in a range

I need to count the number of occurences of a range of dates eg from 1st to
31st of a given month OR set a criteria to count the occurences between 2
dates eg 1/3/08 to 7/3/08 inclusive. The named range is set to presentations
and i have tried countif/sumif and conditional sum wizard yet to no avail.
What I have come close with, but still gives a wrong answer:
=COUNTIF(Presentations,AND("="&"01 Mar 08","<="&"31 Mar 08"))
any help appreciated (dates are dd/mm/yy in Australia)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default counting multiple dates in a range

Try this:

=COUNTIF(Presentations,"="&DATE(2008,3,1))-COUNTIF(Presentations,""&DATE(2008,3,31))

Better to use cells to hold the date boundaries:

A1 = lower date boundary = 1/3/2008 (d/m/y)
B1 = upper date boundary = 31/3/2008 (d/m/y)

=COUNTIF(Presentations,"="&A1)-COUNTIF(Presentations,""&B1)

If you want to count for a specific month and the dates all fall within the
same year, or the year doesn't matter:

=SUMPRODUCT(--(MONTH(Presentations)=3))

Counts all dates in the month of March of *any* year.


--
Biff
Microsoft Excel MVP


"majestyk" wrote in message
...
I need to count the number of occurences of a range of dates eg from 1st to
31st of a given month OR set a criteria to count the occurences between 2
dates eg 1/3/08 to 7/3/08 inclusive. The named range is set to
presentations
and i have tried countif/sumif and conditional sum wizard yet to no avail.
What I have come close with, but still gives a wrong answer:
=COUNTIF(Presentations,AND("="&"01 Mar 08","<="&"31 Mar 08"))
any help appreciated (dates are dd/mm/yy in Australia)



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
Counting Empty Dates within a Range? Gina[_2_] Excel Worksheet Functions 3 July 24th 08 06:03 PM
Counting dates within a specified range MacAttack Excel Discussion (Misc queries) 1 December 7th 06 10:00 PM
counting valid dates in a range of cells TBA Excel Worksheet Functions 5 June 29th 06 04:39 AM
Counting dates in a RANGE (yargh!) :) S Davis Excel Worksheet Functions 2 April 27th 06 03:01 AM
Counting Dates in a Range Matt7102 Excel Discussion (Misc queries) 9 January 13th 06 11:14 PM


All times are GMT +1. The time now is 08:57 AM.

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"