View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Elkar Elkar is offline
external usenet poster
 
Posts: 964
Default sumif using dates

Try this:

=SUMPRODUCT(--(MONTH(A1:A100)=1),--(YEAR(A1:A100)=2007),B1:B100)

This would give you the sum for all dates in January of 2007. To get June,
just change the Month portion to =6, and August would be =8.

HTH,
Elkar


"txm49" wrote:

Column A has mixed dates "m/d/yyyy". I want to sum the associated data in
Column B for each m/y. Sample layout below:

Column A Column B
8/31/2007 5
8/31/2007 15
1/30/2007 10
1/30/2007 20
6/28/2007 30
6/28/2007 10

I want to pull this data into a new file that will have results for Jan
2007, Jun 2007, and Aug 2007. I need the right sum formula, not a macro.