Monthly Sum

S

SSR

Hi folks,

I have a Sheet where i have 2 columns as below, The First Colum is a Date
and the Second Column is say Cost of an Item

A B
1/2/04 100
2/2/04 101
20/2/04 200
3/8/04 300
5/8/04 500
15/8/04 700
19/9/04 50
25/9/04 20
30/10/04 100
...
...

What i want is
A B C
1/2/04 100
2/2/04 101
20/2/04 200 401=100+101+200
3/8/04 300
5/8/04 500
15/8/04 700 1500=300+500+700
19/9/04 50
25/9/04 20 70=50+20
30/10/04 100
...
...


How can i achieve this ?
 
F

Frank Kabel

Hi
enter the following formula in C1:
=IF(OR(MONTH(A2)<>MONTH(A1),A2=""),SUMPRODUCT(--(MONTH($A$1:$A$1000)=MO
NTH(A1)),--(YEAR($A$1:$A$1000)=YEAR(A1)),$B$1:$B$1000),"")

and copy this down for all rows
 
S

SSR

Hi,
Thanks for the Help
I would like to know one thing here . The sumProduct formula is written as
SUMPRODUCT(--(MONTH($A$1:$A$1000)=MO...
What does --Month($A1$A100).. mean?

Regards,
Srinath S
 

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