Calculate the sum

E

evon

Want to find an appropriate formula for the following, please help, thanks!!

Column A Column B
01/05/09 123
02/05/09 456
03/05/09 789
04/05/09 1035
05/05/09 1987
06/05/09 1578
07/05/09 205
08/05/09 186
09/05/09 222
……
31/05/09 123

******************************************
Return as follow.....

04/05/09 return the amount from 01/05 to 03/05 (ie 1,368)
09/05/09 return the amount from 04/05 to 08/09 (ie 4,289)

Many thanks!!
 
J

Jacob Skaria

Suppose you have your dates in ColA and values in ColB....with query dates in
C1 and D1 use the below formula

C1 = start date
D2 = end date

=SUMIF(A:A,">=" & C1,B:B)-SUMIF(A:A,">" & D1,B:B)

If this post helps click Yes
 
J

Jarek Kujawa

D1=01/05/09
D2=04/05/09
D3=09/05/09
....

=SUMPRODUCT(($A$1:$A$50<D2)*($A$1:$A$50>=D1);$B$1:$B$50)
 
J

Jarek Kujawa

replace ; with ,

=SUMPRODUCT(($A$1:$A$50<D2)*($A$1:$A$50>=D1),$B$1:$B$50)

then copy/drag down
 

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