+ Reply to Thread
Results 1 to 2 of 2

Need help with moving average function that picks up cells out of range

  1. #1
    Registered User
    Join Date
    02-04-2014
    Location
    Earth
    MS-Off Ver
    Excel 2010
    Posts
    1

    Need help with moving average function that picks up cells out of range

    Hi all,

    I have a budget spreadsheet where I need to provide the moving 3 month average relative to the last entered month, whenever the spreadsheet is opened. The sequence of values which need to be averaged go from left to right on a row, however, the range does *not* start on the first column in my spreadsheet, causing me some complication. Right now, until the fourth month is entered, the rolling average is calculating a wrong value because it's picking up values to the left of the first intended value in the range. The formula I've come up with so far is this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Where D4 is the first column with values intended for this range, and O4 is the last one. There are values in B4 and C4, but they're for something else, and therein lies my problem.

    Until I have values in at least D4-D6, the moving average calculation is wrong, because it's incorporating values from B4 and C4. This is likely due to the -3 added to the COUNTA function, but I don't know another way to make this work for the rest of the rows.

    What I'd like is some way for the function not to evaluate. Evaluating to 0 will not help as it will still impact what I plan to do with a series of these moving averages. Does anyone have a suggestion?

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Need help with moving average function that picks up cells out of range

    > ... There are values in B4 and C4 but they're for something else ...
    Just some thoughts. Simpler to physically move B4:C4 out of the way (of your formula calcs) to another part of the sheet?
    If it is required for visual/printing purposes, you could try having a linked picture of the 2 cells (which are placed somewhere else) positioned to fit within the original area

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Moving average across variable range
    By SRKfc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-03-2013, 06:11 PM
  2. [SOLVED] Moving average/average function/adjustable length
    By Lv27 in forum Excel General
    Replies: 3
    Last Post: 08-16-2012, 09:43 AM
  3. [SOLVED] Function or Formula to conditionally average a range of cells.
    By Juli in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-14-2012, 02:12 PM
  4. How to calculate sum of a moving range and average it
    By a_driga in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-27-2011, 02:17 AM
  5. Moving AVERAGE function
    By ABSTRAKTUS in forum Excel General
    Replies: 7
    Last Post: 11-23-2010, 04:05 PM

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