Computing a list

S

Squid

Hello all... this is probably fairly simple...

I have a list of dates and corresponding values. I want my user to enter a
range of dates and have the spreadsheet calculate the values within that
range. For example:

A B
1/1/04 60.00
2/1/04 60.00
3/1/04 60.00
4/1/04 60.00

Beginning range value = 1/1/04, Ending range value = 3/1/04. The formula
will return 180.00. The sum of 1/1/04, 2/1/04 & 3/1/04.

TIA
Mike
 
F

Frank Kabel

Hi
=SUMIF(A1:A100,">=" & DATE(2004,1,1),B1:B100)-SUMIF(A1:A100,">" &
DATE(2004,3,1),B1:B100)

or
=SUMPRODUCT(--(A1:A100>=
DATE(2004,1,1)),--(A1:A100<=DATE(2004,3,1)),B1:B100)
 
S

Sandy Mann

Mike,

With the start date in C1 and the end date in C2 try:

=SUM(INDIRECT("B"&MATCH(C1,A1:A4)&":"&"B"&MATCH(C2,A1:A4)))

Adjust ranges as required

HTH

Sandy
 
Top