This works because, the INDEX function returns a reference to the first cell, not the actual value.

The result is a reference that expands.

The SUM function sums the values in the range at each row, creating a running total.

Excel formula: Two-way lookup VLOOKUP in a Table

Simple expanding range

Why not use a simpleexpanding rangelike this?

For some reason, this kind of mixed reference becomes corrupted in an Excel Table as rows are added.

Using INDEX with a structured reference solves the problem.

Excel INDEX function

it’s possible for you to use INDEX to retrieve individual values, or entire rows and columns.

These values can be numbers, cell references, ranges, arrays, and constants, in any combination.

SUM can handle up to 255 individual arguments.

Excel SUM function

Article image

Article image

Article image