Sum a value

J

John

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
 
B

Bob Phillips

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

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
D

Dave Peterson

One more for June of 2006:

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

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