T Tom Feb 14, 2008 #1 I need to count datess in a column if they occur in a specific month and year. Can anyone help?
G Gary''s Student Feb 14, 2008 #2 Put some dates in A1 thru A30: 11/13/2008 11/10/2007 9/2/2007 3/17/2008 5/1/2007 7/9/2008 1/7/2007 10/5/2008 8/27/2007 11/10/2007 6/5/2007 3/21/2007 3/27/2008 5/17/2007 5/2/2008 3/23/2007 10/18/2008 4/6/2008 2/14/2007 12/5/2008 7/3/2007 4/26/2007 9/21/2008 8/23/2008 8/25/2007 6/7/2007 3/3/2007 8/10/2008 8/12/2007 9/4/2008 then =SUMPRODUCT(--(YEAR(A1:A30)=2007),--(MONTH(A1:A30)=5)) will give you the count for May 2007
Put some dates in A1 thru A30: 11/13/2008 11/10/2007 9/2/2007 3/17/2008 5/1/2007 7/9/2008 1/7/2007 10/5/2008 8/27/2007 11/10/2007 6/5/2007 3/21/2007 3/27/2008 5/17/2007 5/2/2008 3/23/2007 10/18/2008 4/6/2008 2/14/2007 12/5/2008 7/3/2007 4/26/2007 9/21/2008 8/23/2008 8/25/2007 6/7/2007 3/3/2007 8/10/2008 8/12/2007 9/4/2008 then =SUMPRODUCT(--(YEAR(A1:A30)=2007),--(MONTH(A1:A30)=5)) will give you the count for May 2007
T Tom Feb 14, 2008 #4 Thanks to both of you. -- Tom Teethless mama said: =SUMPRODUCT(--(MONTH(A1:A100)=2),--(YEAR(A1:A100)=2008) Click to expand...
Thanks to both of you. -- Tom Teethless mama said: =SUMPRODUCT(--(MONTH(A1:A100)=2),--(YEAR(A1:A100)=2008) Click to expand...
D Dave Peterson Feb 14, 2008 #5 Another one: =sumproduct(--(text(a1:a100,"yyyymm")="200804") Adjust the ranges to match--but you can't use whole columns (except in xl2007). =sumproduct() likes to work with numbers. The -- stuff changes trues and falses to 1's and 0's. Bob Phillips explains =sumproduct() in much more detail here: http://www.xldynamic.com/source/xld.SUMPRODUCT.html And J.E. McGimpsey has some notes at: http://mcgimpsey.com/excel/formulae/doubleneg.html
Another one: =sumproduct(--(text(a1:a100,"yyyymm")="200804") Adjust the ranges to match--but you can't use whole columns (except in xl2007). =sumproduct() likes to work with numbers. The -- stuff changes trues and falses to 1's and 0's. Bob Phillips explains =sumproduct() in much more detail here: http://www.xldynamic.com/source/xld.SUMPRODUCT.html And J.E. McGimpsey has some notes at: http://mcgimpsey.com/excel/formulae/doubleneg.html