Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Determining a Simple Moving Average.

Determining a Simple Moving Average

Written by Allen Wyatt (last updated July 31, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003


Jeff needs to create a formula that will return a moving average for a range of cells. He adds data to the worksheet daily and he always want to have an average of the last ten days' information. This always corresponds to the last ten cells in a column.

There are a couple of easy ways you can approach this problem. The solution you choose depends on what you ultimately want to see in the way of an average. For instance, if you want to see how the average changes over time, the best approach is to add an additional column to your worksheet. If the data is in column A (starting in row 2), then you can enter the following formula in cell B11:

=IF(A11>"",AVERAGE(A2:A11),"")

Copy the formula down the column, and you will always have the average of the last ten days shown. As you add new data to column A, the updated moving average appears at the bottom of column B. The advantage is that you can see how the average changes from day to day.

If you don't want to add another column for each day's moving average, you can use a different formula to determine the current moving average. Assuming there are no blanks in column A and that there are more than ten pieces of data in the column, you could use the following formula:

=AVERAGE(OFFSET(A1,COUNTA(A:A)-1,0,-10,1))

The OFFSET function defines the range to average. It looks at the number of cells in column A and selects the last 10 as the desired range.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8345) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Determining a Simple Moving Average.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Word Abnormally Ends when Maximizing Program Window

If Word crashes when you maximize a previously minimized instance of the program, it is a sure sign that there is ...

Discover More

Controlling How Excel Interprets Percentages

When entering data in a worksheet, Excel tries to figure out how your entry can best be shown on the screen. When it ...

Discover More

Characters in the Margin Next to Paragraphs

Laying out a document can be, at times, a challenge. This is particularly the case when you need some special document ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (menu)

Automatically Numbering Rows

Adding row numbers to a column of your worksheet is easy; you just need to use a formula to do it. Here's a quick look at ...

Discover More

Extracting First and Last Words

When working with text phrases stored in cells, it might be helpful to be able to extract words from the phrase. In this ...

Discover More

Stopping a Formula from Updating References

Insert or delete a column, and Excel automatically updates references within formulas that are affected by the change. If ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two more than 7?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.