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'.
 

Some videos you may like

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Watch MrExcel Video

Forum statistics

Threads
1,118,811
Messages
5,574,454
Members
412,595
Latest member
slim313
Top