close

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!

Try in B1 for January 2004.

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

Does that help?

Steve--
SteveG
------------------------------------------------------------------------
SteveG's Profile: www.excelforum.com/member.php...foamp;userid=7571
View this thread: www.excelforum.com/showthread...hreadid=510290Correction to the end results below

quot;jenniferquot; wrote:
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!
Thanks Steve...worked like a charm!

quot;SteveGquot; wrote:

gt;
gt; Try in B1 for January 2004.
gt;
gt; =SUMPRODUCT((YEAR(A1:A10)=2004)*(MONTH(A1:A10)=1))
gt;
gt; Does that help?
gt;
gt; Steve
gt;
gt;
gt; --
gt; SteveG
gt; ------------------------------------------------------------------------
gt; SteveG's Profile: www.excelforum.com/member.php...foamp;userid=7571
gt; View this thread: www.excelforum.com/showthread...hreadid=510290
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()