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 countifs with multiple dates

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 countifs with multiple dates

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)



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default countifs with multiple dates

Hi,

In 2003:
=SUMPRODUCT(--(Presentations=--"3/1/08"),--(Presentations<=--"3/31/08"))
or
=COUNTIF(Presentations,"=3/1/08")-COUNTIF(Presentations,"3/31/08")

In 2007 (the above or):
=COUNTIFS(Presentations,"=3/1/08",Presentations,"<=3/31/08")

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"majestyk" wrote:

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
Countifs to Sumproduct for 2003 - was Simple Countifs.. from Fr Steve Excel Worksheet Functions 2 January 4th 09 05:36 PM
countifs Text and Dates mokihi Excel Worksheet Functions 7 September 4th 08 05:30 AM
Countifs and multiple columns... ajayb Excel Worksheet Functions 1 June 9th 06 03:29 PM
Multiple countifs ozcank Excel Worksheet Functions 2 November 14th 05 10:36 AM
COUNTIFs with multiple criteria Cene K Excel Discussion (Misc queries) 5 October 28th 05 10:43 PM


All times are GMT +1. The time now is 11:32 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"