Using indirect cell references in a function equation

dbell5

New Member
Joined
Nov 30, 2020
Messages
2
Office Version
  1. 2016
  2. 2013
Platform
  1. Windows
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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi & welcome to MrExcel.
How about
Excel Formula:
=AVERAGE(INDEX(C:C,E1):INDEX(C:C,F1))
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
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
    cell average table.png
    10 KB · Views: 6
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,734
Members
448,987
Latest member
marion_davis

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top