Counting distinct entries based on meeting month & year criteria

G

Guest

Hi - please help!

In column A, I have the following entries:
01/05/04
01/10/04
01/01/05
01/15/05
01/20/05
01/30/05
02/08/04
02/13/05
02/20/05
02/21/05

How can I 'count' the number of dates that are in January 2004, January 2005
etc?
Specifically:
For January 2004 date count in cell B1 = 2
For January 2005 date count in cell B1 = 4
For February 2004 date count in cell B1 = 1
For February 2005 date count in cell B1 = 3

Thank you!
 
S

SteveG

Try in B1 for January 2004.

=SUMPRODUCT((YEAR(A1:A10)=2004)*(MONTH(A1:A10)=1))

Does that help?

Stev
 
G

Guest

Correction to the end results below

:
Hi - please help!

In column A, I have the following entries:
01/05/04
01/10/04
01/01/05
01/15/05
01/20/05
01/30/05
02/08/04
02/13/05
02/20/05
02/21/05

How can I 'count' the number of dates that are in January 2004, January 2005
etc?

Specifically:
For January 2004 date count in cell B1 = 2
For January 2005 date count in cell B2 = 4
For February 2004 date count in cell B3 = 1
For February 2005 date count in cell B4 = 3

Thank you!
 

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