Counting dates in a column

G

Guest

I know this might have been worded differently in another question, but I
can't make anything work that I have tried so far.
I have a column of dates in mm/dd/yy format on one sheet, they are all
different (graduation dates of students).
05/12/05
06/05/03
12/12/56
06/06/03
ect.
In a cell on different sheet, I need to count how many students graduated in
a certain month and year.
Result is Number of students graduated in Jun 03?
I can count the month, or I can count the year, but I can't return both the
month and year because of the day in the middle!
Thanks in advance for taking a look at this for me.
Rob
 
D

Domenic

Try...

=SUMPRODUCT(--(MONTH(A1:A10)=6),--(YEAR(A1:A10)=2003))

OR

=SUMPRODUCT(--(DATE(YEAR(A1:A10),MONTH(A1:A10),1)=DATE(2003,6,1)))

Hope this helps!
 
B

Biff

Hi!

Graduation dates are on Sheet1 A1:A100

Sheet2:

A1 = 6 (for the month - June)
B1 = 2003 (year)

=SUMPRODUCT(--(MONTH(Sheet1!A1:A100)=A1),--(YEAR(Sheet1!A1:A100)=B1))

Biff
 
R

Ron Rosenfeld

I know this might have been worded differently in another question, but I
can't make anything work that I have tried so far.
I have a column of dates in mm/dd/yy format on one sheet, they are all
different (graduation dates of students).
05/12/05
06/05/03
12/12/56
06/06/03
ect.
In a cell on different sheet, I need to count how many students graduated in
a certain month and year.
Result is Number of students graduated in Jun 03?
I can count the month, or I can count the year, but I can't return both the
month and year because of the day in the middle!
Thanks in advance for taking a look at this for me.
Rob

If your dates are in a range labeled Dates on Sheet1, and are normal Excel
dates, then:

=COUNTIF(Dates,">="&DATE(2003,6,1)) - COUNTIF(Dates,">"&DATE(2003,6,30))


--ron
 
B

Bob Phillips

Domenic said:
Try...

=SUMPRODUCT(--(MONTH(A1:A10)=6),--(YEAR(A1:A10)=2003))

or =SUMPRODUCT(--(TEXT(A1:A6,"mmyyyy")="062003"))

just an alternative <g>
 

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

Top