Formulae - variable cell reference

thunderfoot

Board Regular
Joined
May 28, 2004
Messages
229
I have a column of about 600 numbers, say recorded in column 'A' (recorded Odds from a Betting site in 1 second intervals). To one side of this column I want a 'Running Average' based over the last 'x' numbers.

Obviously I can use =AVERAGE(A1:A50) in cell B51 and =AVERAGE(A2:A51) in cell B52 etc. etc by just copying the formulae down column 'B'.

However, I want to experiment and find out "should I use the last 50 numbers or the last 'x' numbers".

To do this I could just change the formulae in column 'B', BUT is there a way to do the following?

In a cell, say C1, enter a number 20, then the AVERAGE formuale would use the last 20 numbers; if I changed the number in cell C1 to 10 then the AVERAGE formulae would use the last 10 numbers etc. etc. thereby somehow using the number entered in cell C1 to determine over how many numbers in column 'A' are used to calculate a 'Running Average'.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,214,905
Messages
6,122,175
Members
449,071
Latest member
cdnMech

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