Calculating moving average

  • Thread starter luc.van.straaten
  • Start date
L

luc.van.straaten

I would like to calculate the 2-period moving average of a dataset in
A1:A20. I understand that this can be done by AVERAGE(A1:A2) and the
other moving averages will appear in the selected column when
"dragging" the formula to the other cells of the column. My problem is
that i would like to see the results diagonally instead of vertically
(B3,C4,D5,E6,F7 etc. instead of B3,B4,B5,B6,B7 etc.) Can somebody help
me?
 
B

Bob Phillips

Try

=AVERAGE(INDEX($A$1:$A$20,ROW()-1):INDEX($A$1:$A$20,ROW()))

In B3

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top