Can one get the average of a variable range determined by formula?

JeffFinnan

Board Regular
Joined
Aug 12, 2020
Messages
61
Office Version
  1. 2019
Platform
  1. Windows
These two formulas get the proper addresses for two numbers.

=CELL("address",INDEX(E$2:E$200,MATCH(AW3,B$2:B$200,0))) correctly yields $E$61

=CELL("address",INDEX(E$2:E$200,MATCH(AX3,B$2:B$200,0))) correctly yields $E$131

AW3 and AX3 are dates. The E range are just numbers.

If I type in =AVERAGE($E$61:$E$131), I get the proper average.

My thinking is that using =AVERAGE(CELL("address",INDEX(E$2:E$200,MATCH(AW3,B$2:B$200,0))):CELL("address",INDEX(E$2:E$200,MATCH(AX3,B$2:B$200,0))) would give the average for the range of numbers too. Instead I get a DIV/0! error. What do I need to do to get the average of a variable range of cell values?

Thanks,
Jeff
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Try:

=AVERAGE(INDEX(E$2:E$200,MATCH(AW3,B$2:B$200,)):INDEX(E$2:E$200,MATCH(AX3,B$2:B$200,)))
 
Upvote 0
Solution
Try:

=AVERAGE(INDEX(E$2:E$200,MATCH(AW3,B$2:B$200,)):INDEX(E$2:E$200,MATCH(AX3,B$2:B$200,)))
Not sure why this works. I tested to make sure.

=AVERAGE($E$61:$E$131) yields 77.0 and your formula also yields 77.0.

Thanks again
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,111
Members
453,021
Latest member
Justyna P

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