Search code examples
excelexcel-formulaaveragecellsexcel-indirect

Excel, How to use average with indirect?


I've been trying to use AVERAGE with INDIRECT but keeps giving me errors.

Now I am using Average like this: AVERAGE(Results!C2:C51) I need to get data from another sheet "Results". But in my current sheet I got the range of the rows set in two cells.

+-------------------+
|    ...  E   F     |
|   +-------+-------+
| 2 |...| 2 | 51|   |
|   +---------------+
| 3 |   | 52|101|   |
|   +---------------+
| 4 |   |   |   |   |
+---+---+---+---+---+

I've tried like this, but it's not working:

AVERAGE(Results!INDIRECT("C"&E2):INDIRECT("C"&F2))

Solution

  • This should do it:

    =AVERAGE(INDIRECT("Results!C"&E2&":C"&F2))