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
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,526
Office Version
  1. 365
Platform
  1. Windows
Hi & welcome to MrExcel.
How about
Excel Formula:
=AVERAGE(INDEX(C:C,E1):INDEX(C:C,F1))
 
Solution

dbell5

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

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,526
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,521
Messages
5,625,295
Members
416,087
Latest member
drth

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
Top