I have a spreadsheet that contains a list of data points over time, along with some time values that denote events. I want to sum all the data points between each of the event values.

My spreadsheet looks something like this:

The index of the cell closest to the event I can obtain by using `=MATCH(K13, $B$12:$B$8889, 1)`

(for example), which returns the index (e.g. `301`

as above). However, I don't know how to go from those indicies, which specify a cell, to the sum of a series.

The value I can swipe with something like `=INDEX($G$12:$G$8889,M13)`

, but I don't want just the one value, I want to sum everything between, say, 1 (aka `B12`

) and 301 (`B312`

).