# Using indirect cell references in a function equation

#### dbell5

##### New Member
I am trying to compute AVERAGE() of selected ranges of cells in a data table (hundreds of thousands of rows).

The Start and End row numbers are hand-selected and stored in reference cells.
I then want to compose the AVERAGE() function call to refer to those Start and End cells.

Something like the following, which doesn't work:
=AVERAGE( INDIRECT("C"&E1) & ":" & INDIRECT("C"&F1) ), where the data are in column C and the Start/End are in E1 and F1, respectively.

There will be a small number (10 to 20) of these entries, averaging different ranges, with Start/End points in (E1:F10), for example.
I would expect to pull down and copy the AVERAGE() cells, with the row numbers updating...
=AVERAGE( INDIRECT("C"&E1) & ":" & INDIRECT("C"&F1) )
=AVERAGE( INDIRECT("C"&E2) & ":" & INDIRECT("C"&F2) )
=AVERAGE( INDIRECT("C"&E3) & ":" & INDIRECT("C"&F3) )
etc.

Thank you for any suggestions!
Dave

### Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

#### Fluff

##### MrExcel MVP, Moderator
Hi & welcome to MrExcel.
Excel Formula:
``=AVERAGE(INDEX(C:C,E1):INDEX(C:C,F1))``

#### dbell5

##### New Member
Hi & welcome to MrExcel.
Excel Formula:
``=AVERAGE(INDEX(C:C,E1):INDEX(C:C,F1))``
Well, that's why we come to the experts in the Forums!
Works perfectly, thank you very much!

#### Attachments

• cell average table.png
10 KB · Views: 5

#### Fluff

##### MrExcel MVP, Moderator
You're welcome & thanks for the feedback.

Replies
6
Views
459
Replies
2
Views
214
Replies
1
Views
267
Replies
10
Views
162
Replies
2
Views
955

1,127,618
Messages
5,625,888
Members
416,141
Latest member
Bartek9q

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back