+ Reply to Thread
Results 1 to 3 of 3

Finding Moving Average in Excel 2010

  1. #1
    Registered User
    Join Date
    02-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Exclamation Finding Moving Average in Excel 2010

    I have a problem with finding the suitable formula for finding the moving average. I can only use the functions "average", "index", and "row" to find the Nth day moving average. I cannot use anything such as "offset" or simply use the data analysis tool. That means, for example, if my original nth value of days were 4, and if I change it to 5, excel has to automatically change all the values of the moving average in terms of 5 days from 4 days. Also, I do not want excel to calculate the blank spaces. Every time I try calculating, it adds the blank cells and treats the blank cells as the value 0. I want to exclude all the blank spaces so that if there are not enough days to calculate the moving average, the cell will show #N/A or something similar instead of calculating the average while including the blank cells.

    stock0.xlsx

    I have attached a file. I need to find the moving average for the cell E (The one that says "close"). I do not know what to do so I just used the "average" function. But that won't change the values of "N-MA" if I change my nth value. Since I do not know how to do it, I just manually typed in #N/A.

    Please help. Thanks.

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Finding Moving Average in Excel 2010

    Why can't you use offset - as in, how do we know which functions are available?

    I did this while I was waiting for an answer...
    =IF(INDEX(E:E,ROW()+$P$2-1),AVERAGE(E2:INDEX(E:E,ROW()+P$2-1)),NA())
    Last edited by Cheeky Charlie; 02-26-2013 at 01:41 PM.
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  3. #3
    Registered User
    Join Date
    02-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Finding Moving Average in Excel 2010

    Many thanks! :d

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1