Formula referencing cells depending on another cell's value

EngrStudent

New Member
Joined
Jul 18, 2007
Messages
4
I have a spread sheet with four columns of data. Column A is a list of numbers. I need to take the average over a specific range of cells in Column A and place that average in Column D. Column B & C tell me the range of cells I need the average between. For example if B1 = 3 and C1 = 7, then D1 = AVERAGE(A3:A7). However, I need a way to write this formula referencing B1 and C1 so I don't have to manually type the formula for every Column D cell. Something like D3 = AVERAGE(A[B3]:A[C3]) imagining that [X] took the value in the cell.

Clear? I had trouble explaining this one to a friend. Thank you.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Thanks a lot! That works well.

Though my Excel Sheet is a bit more complicated and "Column A" and "Column B & C" are on separate sheets.

I am using
=AVERAGE(INDEX(Sheet2!A:A,Sheet3!B1):INDEX(Sheet2!A:A,Sheet3!C1))

I think this should work.
 
Upvote 0

Forum statistics

Threads
1,215,741
Messages
6,126,587
Members
449,319
Latest member
iaincmac

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