SUM-ing date for different time intervals

M

Mortir

I have the following case:

DATE VALUE
1.12.2006 100
4.12.2006 200
6.12.2006 250
7.12.2006 100
11.12.2006 1500
13.12.2006 250
14.12.2006 400
15.12.2006 950
27.12.2006 200
28.12.2006 30
29.12.2006 80

Now i'd like to SUM the values for specific time intervals, lets say:

from 01.12.06 til 06.12.06 SUM=550
from 07.12.06 til 15.12.06 SUM= 3200

etc. I'd like to be able to change the time intervals and have a
formula that sums the values for different chosen intervals!

10x for your help!
 
V

vezerid

Hi,
place the starting dates in a column, say F2:F10. F2: 1.12.2006, F3:
7.12.2006 etc.

Next to F2, in G2 place the ending dates, 6.12.2006, 15.12.2006 etc.

In H2:
=SUMPRODUCT($B$2:$B$100*($A$2:$A$100>=F2)*($A$2:$A$100<=G2))

Copy down.

HTH
Kostis Vezerides
 
Top