Counting Dates #2

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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,
 
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
 
=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)
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Counting specific dates 9
count records in a date range 3
YEAR MONTH DAYS COUNTER 3
Combining IF and Count functions 6
Average problem 1
Count Inbetween dates 3
Formula to count Month in Dates 4
IF OR Formula 1

Back
Top