+ Reply to Thread
Results 1 to 4 of 4

Moving Averages And the First Few Data Points

  1. #1
    Registered User
    Join Date
    09-05-2011
    Location
    St. John's, Canada
    MS-Off Ver
    Excel 2010
    Posts
    70

    Moving Averages And the First Few Data Points

    Hey Everyone,

    I'm trying to create a Moving Average for price data. I want to be able to enter the number of data points I wish to use, rather than rewriting the average formula over and over again. I'm pretty close to my goal, however the first few data points return the "#REF!" error because the formula is trying to include the column title in the calculation.

    I'm wondering if there's a way that if excel is told to use the 5 data points that it won't return the "#REF!" error, rather just the data points themselves ?, for example under the Short SMA if I request for excel to use 5 data points, I get 3 "#REF!", can I create a statement that says "If the formula Returns "#REF!" then Return today's Data Point", in other words do not do a calculation just give me today's price?

    I have attached a sample sheet to clarify.
    Attached Files Attached Files
    Last edited by ashleys.nl; 01-15-2012 at 09:55 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Moving Averages And the First Few Data Points

    Hi ashleys,

    See the attached file where I have corrected the formula for short sma, which can be replicated for other column as well. Let me know if face any challenge.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    09-05-2011
    Location
    St. John's, Canada
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: Moving Averages And the First Few Data Points

    Thanks! Works like a charm!

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Moving Averages And the First Few Data Points

    You are welcome ashleys...

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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