Sum a value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear all,

I have two columns in Excel, one is date, the other is value,For Example

A Column B Column
01-Jun-06 20
02-JUn-06 30
01-Aug-06 100
07-Oct-06 900
09-Jun-06 100
I want to sum those values when month is 6 (Jun)
How can I set this formula to do it?

Thanks you
 
=sumproduct(--(MONTH(A1:A100)=6),--(YEAR(A1:A100)=2006),B1:b100)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
One more for June of 2006:

=sumproduct(--(text(a1:a100,"yyyymm")="200606"),b1:b100)
 
Back
Top