
=SUM(INDEX(data,0,column))
Related formulas
Lookup and sum column
To sum a range, for example a column or row, you can use the INDEX function to return values in the range and the SUM function to sum those values.
In the example shown, the formula in H6 is:
=SUM(INDEX(data,0,H5))
where "data" is the named range C5:E9.
The INDEX function looks up values by position. For example, this formula retrieves the value for Acme sales in Jan:
=INDEX(data,1,1)
The INDEX function has a special and non-obvious behavior: when the row number argument is supplied as zero or nothing, INDEX retrieves all values in the column referenced by the column number argument. Likewise, when the column number is supplied as zero or nothing, INDEX retrieves all values in the row referenced by the row number argument:
=INDEX(data,0,1) // all of column 1=INDEX(data,1,0) // all of row 1
In the example for formula, we supply the named range "data" for array, and we pick up the column number from H2. For row number, we deliberately supply zero. This causes INDEX to retrieve all values in column 2 of "data'.
The formula is solved like this:
=SUM(INDEX(data,0,2))=SUM({9700;2700;23700;16450;17500})=70050
Note: this technique is useful for dashboards, or any situation you need to run a calculation on a range that is "dynamic", i.e. a range that may change based on user input. You can use the same approach for other calculations by replacing SUM with AVERAGE, MAX, MIN, etc.

=SUM(INDEX(data,0,column))
Related formulas
Lookup and sum column
To sum a range, for example a column or row, you can use the INDEX function to return values in the range and the SUM function to sum those values.
In the example shown, the formula in H6 is:
=SUM(INDEX(data,0,H5))
where "data" is the named range C5:E9.
The INDEX function looks up values by position. For example, this formula retrieves the value for Acme sales in Jan:
=INDEX(data,1,1)
The INDEX function has a special and non-obvious behavior: when the row number argument is supplied as zero or nothing, INDEX retrieves all values in the column referenced by the column number argument. Likewise, when the column number is supplied as zero or nothing, INDEX retrieves all values in the row referenced by the row number argument:
=INDEX(data,0,1) // all of column 1=INDEX(data,1,0) // all of row 1
In the example for formula, we supply the named range "data" for array, and we pick up the column number from H2. For row number, we deliberately supply zero. This causes INDEX to retrieve all values in column 2 of "data'.
The formula is solved like this:
=SUM(INDEX(data,0,2))=SUM({9700;2700;23700;16450;17500})=70050
Note: this technique is useful for dashboards, or any situation you need to run a calculation on a range that is "dynamic", i.e. a range that may change based on user input. You can use the same approach for other calculations by replacing SUM with AVERAGE, MAX, MIN, etc.