#1   Report Post  
Posted to microsoft.public.excel.misc
Cody
 
Posts: n/a
Default Counting Dates #2

What formula to read a range of cells with a lot of dates in it and than
count how many times the current month shows up in it (has to recognize the
year too because if it only counts all dates with November in them it cant
count 2003, 2004 etc.. only the current month)

Example:

11/4/2005
11/9/2003
11/12/2005
12/1/2005

This would need to give me a total of: 2

Thank you,
--
na
  #2   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Counting Dates #2

Hi!

Try one of these:

=SUMPRODUCT(--(TEXT(A1:A4,"mmmyyyy")="Nov2005"))

OR:

B1 = 'Nov2005

=SUMPRODUCT(--(TEXT(A1:A4,"mmmyyyy")=B1))

OR:

=SUMPRODUCT(--(MONTH(A1:A4)=MONTH(TODAY())),--(YEAR(A1:A4)=YEAR(TODAY())))

Biff

"Cody" wrote in message
...
What formula to read a range of cells with a lot of dates in it and than
count how many times the current month shows up in it (has to recognize
the
year too because if it only counts all dates with November in them it cant
count 2003, 2004 etc.. only the current month)

Example:

11/4/2005
11/9/2003
11/12/2005
12/1/2005

This would need to give me a total of: 2

Thank you,
--
na



  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Counting Dates #2

=SUMPRODUCT(--(DATE(YEAR(A2:A20),MONTH(A2:A20),1)=--"2005-11-01"))


the thing here is always to test against the first of the month in question

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Cody" wrote in message
...
What formula to read a range of cells with a lot of dates in it and than
count how many times the current month shows up in it (has to recognize

the
year too because if it only counts all dates with November in them it cant
count 2003, 2004 etc.. only the current month)

Example:

11/4/2005
11/9/2003
11/12/2005
12/1/2005

This would need to give me a total of: 2

Thank you,
--
na



  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Counting Dates #2

One more...

=COUNTIF(A1:A10,"<="&DATE(2005,11,30)) - COUNTIF(A1:A10,"<"&DATE(2005,11,1))

======
If you have lots of these to calculate, you may want to try a pivottable. Then
group by month and year.



Cody wrote:

What formula to read a range of cells with a lot of dates in it and than
count how many times the current month shows up in it (has to recognize the
year too because if it only counts all dates with November in them it cant
count 2003, 2004 etc.. only the current month)

Example:

11/4/2005
11/9/2003
11/12/2005
12/1/2005

This would need to give me a total of: 2

Thank you,
--
na


--

Dave Peterson
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 individual dates Robin Excel Discussion (Misc queries) 5 June 15th 05 07:02 PM
Counting dates in a column Robb27 Excel Worksheet Functions 4 May 25th 05 09:31 AM
Counting Dates MJMP Excel Worksheet Functions 2 May 24th 05 07:34 PM
Counting occurences of a specific day between two dates coal_miner Excel Worksheet Functions 1 April 20th 05 03:37 PM
counting entries between two dates? Todd Excel Worksheet Functions 7 November 1st 04 11:07 PM


All times are GMT +1. The time now is 09:23 PM.

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"