Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default When using a rolling average, is this possible

First of all, thanks in advance if anyone can answer this for me.

This is the scenario.... I am tracking a running average of the last 10 days
worth of statistics. What I would like to do is this.....

Say I have 10 days worth of information already, on the 11th day, I want to
key in the new data and have it drop the last value out of the formula
(equation). What I envisioned was having, for instance, cell A2 open to input
the next days data, and cells A3-A11 to have the last 10 days worth of data.
So when I key in a value to A2 it will automatically shift the column down
and A3 will be the value I just keyed in, while also, kick out the value that
was in column A12. I know this probably seems a little complicated by the way
I am explaining it. I will give a brief visual example below. Thanks again.

Current data
A
1
2 9
3 12
4 8
5 7
6 11
7 3
8 9
9 14
10 3
11 7

New scenario
A
1 new value + enter (ie. 10)
2 9
3 12
4 8
5 7
6 11
7 3
8 9
9 14
10 3
11 7

New result
A
1
2 10
3 9
4 12
5 8
6 7
7 11
8 3
9 9
10 14
11 3

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default When using a rolling average, is this possible

Hi,

You will need to use VBA code to do this. You could avoid that if you
entered the data at the bottom of the list. You can record the step you use
and then put them in a macro such as this:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("A2"))
If Not isect Is Nothing Then
'Your code here
End If
End Sub

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"JW118877" wrote:

First of all, thanks in advance if anyone can answer this for me.

This is the scenario.... I am tracking a running average of the last 10 days
worth of statistics. What I would like to do is this.....

Say I have 10 days worth of information already, on the 11th day, I want to
key in the new data and have it drop the last value out of the formula
(equation). What I envisioned was having, for instance, cell A2 open to input
the next days data, and cells A3-A11 to have the last 10 days worth of data.
So when I key in a value to A2 it will automatically shift the column down
and A3 will be the value I just keyed in, while also, kick out the value that
was in column A12. I know this probably seems a little complicated by the way
I am explaining it. I will give a brief visual example below. Thanks again.

Current data
A
1
2 9
3 12
4 8
5 7
6 11
7 3
8 9
9 14
10 3
11 7

New scenario
A
1 new value + enter (ie. 10)
2 9
3 12
4 8
5 7
6 11
7 3
8 9
9 14
10 3
11 7

New result
A
1
2 10
3 9
4 12
5 8
6 7
7 11
8 3
9 9
10 14
11 3

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rolling Average James Excel Worksheet Functions 2 November 11th 08 08:03 PM
rolling average William Okumu Excel Worksheet Functions 5 May 25th 06 03:49 PM
Rolling Average SPenney Excel Worksheet Functions 5 February 10th 06 03:21 PM
Rolling 3 mth Average dallin Excel Worksheet Functions 1 November 22nd 05 04:10 PM
Rolling Average Bearcats_85 Excel Discussion (Misc queries) 7 July 19th 05 03:19 PM


All times are GMT +1. The time now is 12:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"