+ Reply to Thread
Results 1 to 4 of 4

Rolling Average with Blanks

  1. #1
    Registered User
    Join Date
    06-23-2015
    Location
    Austin
    MS-Off Ver
    MAC 2011
    Posts
    18

    Rolling Average with Blanks

    See attached spreadsheet. In Column D, I am taking the average of the last 25 non blank values from Column C. The formula I'm using works, but as an array formula it takes an exceptionally long time to calculate (especially in the larger master spreadsheet of which it is a part). I'm looking for suggestions on a more efficient way to accomplish that, perhaps not using an array. Removing the blank rows is not an option, they are part of the overall data set and will need to remain. Any suggestions would be most appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Rolling Average with Blanks

    Hi,

    For a start, don't use IFERROR, which causes unnecessary calculations - explanation contained in my response here.

    Secondly, avoid volatile functions like INDIRECT.

    Try, in D11:

    =IF(OR(A11="",COUNT($C$11:C11)<$B$4),"",SUM(IF(ROW($C$11:C11)>=LARGE(IF($C$11:C11<>"",ROW($C$11:C11)),$B$4),$C$11:C11))/$B$4)

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    06-23-2015
    Location
    Austin
    MS-Off Ver
    MAC 2011
    Posts
    18

    Re: Rolling Average with Blanks

    Thanks, this works great. Incidentally, I tend to use a IFERROR a lot - wasn't aware that it was such an intensive function. Thank you for the tip - is there an easy alternative that you tend to defer to?
    Last edited by jblack6572; 05-08-2019 at 05:10 PM.

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Rolling Average with Blanks

    Quote Originally Posted by jblack6572 View Post
    Thanks, this works great. Incidentally, I tend to use a IFERROR a lot - wasn't aware that it was such an intensive function. Thank you for the tip - is there an easy alternative that you tend to defer to?
    Yes, as given in the link and also here, you can include a conditional statement prior to the main clause, such that the latter is not calculated unnecessarily for rows beyond the expected number of returns.

    Regards

+ 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. 10 day Rolling Average
    By theboogieman in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-30-2018, 06:54 PM
  2. Rolling average using offset that ignores blanks
    By jd33a in forum Excel General
    Replies: 1
    Last Post: 09-07-2017, 05:14 PM
  3. [SOLVED] Rolling/Moving Average: Last "n" values not including blanks in a row
    By Gooner2408 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 09-24-2013, 12:08 PM
  4. [SOLVED] Rolling average with data in a row using only last 10 entries ignoring blanks
    By Lasers Reef in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-22-2013, 09:37 PM
  5. Replies: 1
    Last Post: 05-13-2009, 02:40 AM
  6. Rolling Average
    By Skee in forum Excel General
    Replies: 9
    Last Post: 04-19-2009, 02:39 PM
  7. [SOLVED] Weighed Average of a weiged average when there are blanks
    By krl - ExcelForums.com in forum Excel General
    Replies: 1
    Last Post: 07-06-2005, 03: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