Thread: monthly total
View Single Post
  #11   Report Post  
Don Guillett
 
Posts: n/a
Default

If you like it, that's great but you really don't need to add a col...

--
Don Guillett
SalesAid Software

"Turk" wrote in message
...
I have changed my mind to use the 3rd formula, with little modification.

By entering 2005-01 at H1 and coping down the column,

=SUMPRODUCT(--(TEXT($A$1:$A$6,"yyyy-mm")=H1),$B$1:$B$6)

So user friendly! Thanks again......



"Don Guillett" 撰寫於郵件新聞
...
To add a bit instead of editing for 1, 2, 3 you could have used row(a1)

and
copied down

--
Don Guillett
SalesAid Software

"Turk" wrote in message
...
The second formula is the one I wanted, thanks a lot~


"KL" 撰寫於郵件新聞
...
Hi Turk,

If all data belong to the same year you could try the following

formula
to
get the sum for January:

=SUMPRODUCT(--(MONTH($A$1:$A$6)=1),$B$1:$B$6)

otherwise:


=SUMPRODUCT(--(MONTH($A$1:$A$6)=1),--(YEAR($A$1:$A$6)=2005),$B$1:$B$6)

or

=SUMPRODUCT(--(TEXT($A$1:$A$6,"mmyy")="0105"),$B$1:$B$6)

etc.

You can also replace =1 with a reference to the cell that contains

the
number of the month, e.g.

=SUMPRODUCT(--(MONTH($A$1:$A$6)=D1),$B$1:$B$6)

Regards,
KL


"Turk" wrote in message
...
Dear all,

I have a worksheet as below

5/1/2005 50
23/1/2005 100
18/1/2005 120
2/2/2005 12
12/2/2005 24
4/3/2005 15

I want to sum up the total of each month to get

Jan 2005 270
Feb 2005 36
Mar 2005 15

What should be the formula?
thanks....

ims