+ Reply to Thread
Results 1 to 3 of 3

3 month rolling - dynamic

  1. #1
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    3 month rolling - dynamic

    Hi,

    I have one row with data from july last year to july this year with some sales data. this data is generated via some complex formulas which in case of error display "0", but now because of this seem to interfere with my 3 months rolling formula.

    Basically what I need is a formula that calculates an average of the last (rightmost) 3 cells and ignores the cells with "0".

    Data starts from C54 to N54.

    Any help is much appreciated,
    thanks!
    A2k

  2. #2
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Office 365
    Posts
    1,899

    Re: 3 month rolling - dynamic

    Hi,

    Sample workbook.

    Punnam

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: 3 month rolling - dynamic

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    1
    Average
    ------
    ------
    ------
    ------
    ------
    ------
    ------
    ------
    ------
    2
    18
    75
    62
    0
    4
    0
    28
    0
    22
    0


    This array formula** entered in A2:

    =AVERAGE(IF(B2:J2>0,IF(COLUMN(B2:J2)>=LARGE(IF(B2:J2>0,COLUMN(B2:J2)),3),B2:J2)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Assumes there will always be at least 3 non zero entries.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. [SOLVED] Turn Dynamic Horizontal Chart into 12-month rolling
    By robbrown in forum Excel General
    Replies: 7
    Last Post: 12-27-2015, 05:22 PM
  2. Rolling 12 Month Dynamic Calculation
    By bapswarrior in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-29-2013, 04:37 PM
  3. Rolling month
    By wyotechpro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-15-2008, 04:08 PM
  4. Replies: 2
    Last Post: 11-30-2005, 04:15 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