Summing between Range

C

cb3291u

I have been trying to sum cells between two dates.
A B
1/1 8
1/2 8
1/3 8
1/4 8
1/5 5
1/6 7
1/7 9


For example what would I do if I wanted the sum of values in column B
between 1/1 and 1/5. I have years worth of data and a lot of different
intervals. Any help would be appreciated. Thanks in advance
 
A

Ardus Petus

Assuming you have 1/1 in C1 and 1/5 in C2:
=SUMPRODUCT((A1:A1000>=C1)*(A1:A1000<=C2);B1:B1000)

Cheers,
 
P

pryan75

I use this, seems to work:

=SUMPRODUCT(--($Q$6:$Q$220>=DATE(2005,9,1)),--($Q$6:$Q$220<DATE(2005,10,1)),$V$6:$V$220)

With Column Q containing the dates and column V containing the values
to be summed.

P
 
Top