Explanation

The INDEX function looks up values by position.

For row number, we deliberately supply zero.

This causes INDEX to retrieve all values in column 2 of “data'.

Excel formula: Lookup and sum column

you’re free 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 formula: Return array with INDEX function

Excel INDEX function

Excel SUM function