ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calculate a moving average (https://www.excelbanter.com/excel-discussion-misc-queries/253647-calculate-moving-average.html)

Gib Montgomery

Calculate a moving average
 
I want to calculate moving averages on a large spreadsheet by adding a column
(BB) and deleting another (O), daily.
When I add new data by inserting a new column (BC) and deleting the old one
(O) my newest5 information is then in Column BB, but the formula for
averaging - originally written as =AVERAGE(O7:BB7) changes to
=AVERAGE(O7:BA7), and ignores the new column of data.
Manually changing the formula each time is a pain.
Every suggestion is welcome. My fingers are getting sore.

Gary''s Student

Calculate a moving average
 
=AVERAGE(INDIRECT("O7:BB7"))

Immune to columns add/delete.
--
Gary''s Student - gsnu200909


"Gib Montgomery" wrote:

I want to calculate moving averages on a large spreadsheet by adding a column
(BB) and deleting another (O), daily.
When I add new data by inserting a new column (BC) and deleting the old one
(O) my newest5 information is then in Column BB, but the formula for
averaging - originally written as =AVERAGE(O7:BB7) changes to
=AVERAGE(O7:BA7), and ignores the new column of data.
Manually changing the formula each time is a pain.
Every suggestion is welcome. My fingers are getting sore.


מיכאל (מיקי) אבידן

Calculate a moving average
 
This one will "provide the same merchandise":
=AVERAGE(OFFSET($O$7,,,,40))
Micky


"Gib Montgomery" wrote:

I want to calculate moving averages on a large spreadsheet by adding a column
(BB) and deleting another (O), daily.
When I add new data by inserting a new column (BC) and deleting the old one
(O) my newest5 information is then in Column BB, but the formula for
averaging - originally written as =AVERAGE(O7:BB7) changes to
=AVERAGE(O7:BA7), and ignores the new column of data.
Manually changing the formula each time is a pain.
Every suggestion is welcome. My fingers are getting sore.



All times are GMT +1. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com