View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default How do I create a moving average in Excel?

Hi!

Assumes your data to average is in row 1 and starts in cell B1 *and* there
are at least 12 values to average.

=AVERAGE(OFFSET(B1,,COUNT(1:1)-1,,-12))

If you might not have 12 entries or there might be empty cells or you might
want to exclude any 0 values......then it gets much more complicated!

Biff

"SamA" wrote in message
...
RagDyer,
I guess I should have used a better example, I was looking for something
that would provide the average as follows:

example 1
1/2005 through 12/2005 and then when 1/2006 got populated the average
would
be of 2/2005 through 1/2006 and keep rolling as I added more data.

Thank you for your response.

"RagDyer" wrote:

When you say "rolling", do you mean:

Case #1
1 to 12 - Jan to Dec
2 to 13 - Feb to Jan
3 to 14 - Mar to Feb

OR
Case #2
1 to 12 - Jan to Dec-04
13 to 24 - Jan to Dec-05
25 to 36 - Jan to Dec-06

With data in Column A:

Case #1
=AVERAGE(A1:A12)
And copy down as needed.

Case #2
=AVERAGE(INDEX(A:A,12*ROWS($1:1)-11):INDEX(A:A,12*ROWS($1:1)))
And copy down as needed.
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"SamA" wrote in message
...
I am trying to create a 12 month rolling average, example follows.

J F M A M J J A S O N D
average
item 1 2 3 4 5 6 7 8 9 10 11 12 (rolling

average)

thank you