#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Sum a value

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Sum a value

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

--
HTH

Bob Phillips

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

"John" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Sum a value

One more for June of 2006:

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

John wrote:

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


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"