where “data” is the named range C5:E9. The INDEX function has a special and non-obvious behavior: when the row number argument is supplied as zero or null, 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: 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:

### Other calculations

You can use the same approach for other calculations by replacing SUM with AVERAGE, MAX, MIN, etc. For example, to get an average of values in the third month, you can use:

### More than one column or row

To handle return more than one row or column with INDEX, see the approach described here to “dereference” INDEX.

### Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.