#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Countif

I need to count the occurences of dates between a range, either a week or
calendar month. I have so far:
=COUNTIF(Presentations,AND("="&"1/03/08","<="&"31/03/08"))
(**dates are dd/mm/yyy for Australia**). I keep getting an answer of 0 where
it should be 7.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Don is offline
external usenet poster
 
Posts: 487
Default Countif

ok, not sure how to put an And within a countif statement but you can group
two countifs togther

Note that March 1, 2008 in Excel is 39508 and March 31, 2008 is 39538

So we can do

=COUNTIF(Presentations,"=39508")-COUNTIF(Presentations,"39538")

should work I hope

"majestyk" wrote:

I need to count the occurences of dates between a range, either a week or
calendar month. I have so far:
=COUNTIF(Presentations,AND("="&"1/03/08","<="&"31/03/08"))
(**dates are dd/mm/yyy for Australia**). I keep getting an answer of 0 where
it should be 7.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Countif

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 occurences of dates between a range, either a week or
calendar month. I have so far:
=COUNTIF(Presentations,AND("="&"1/03/08","<="&"31/03/08"))
(**dates are dd/mm/yyy for Australia**). I keep getting an answer of 0
where
it should be 7.



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 HELP Excel Discussion (Misc queries) 10 June 29th 06 01:53 PM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


All times are GMT +1. The time now is 05:55 AM.

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

About Us

"It's about Microsoft Excel"