+ Reply to Thread
Results 1 to 3 of 3

Shifting Average Function when adding a new column

  1. #1
    Registered User
    Join Date
    10-23-2012
    Location
    Portland, OR
    MS-Off Ver
    Microsoft 365
    Posts
    50

    Shifting Average Function when adding a new column

    Hello,

    First off, thanks for taking the time to check this out.

    What I'm trying to do is create an average formula that shifts as I add columns. I have a "10 Week Average" that I continue to add the latest week to, but I always need to manually shift my formula to the latest 10 columns. I've attached a sample of the weeks and how a column is added.

    Any help would be super appreciated!

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Shifting Average Function when adding a new column

    You can use OFFSET() function and INDEX() function to make range dynamic.

    In M6:
    =IFERROR(ROUND(AVERAGE(OFFSET(M6,0,-10,1,10)),0),0)

    Copy Down.

    In N6:
    =ROUND(AVERAGE($G6:INDEX($C6:OFFSET(N6,0,-1),MATCH(DATE(2020,10,1),$C$5:OFFSET(N6,5-ROW(),-2),1))),0)

    Copy down.

    NOTE: You will need to adjust Date() for different Quarter.

    Personally, I'd recommend that you restructure data to flat table (i.e. Single Date column, rather than growing data across).
    "Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    10-23-2012
    Location
    Portland, OR
    MS-Off Ver
    Microsoft 365
    Posts
    50

    Re: Shifting Average Function when adding a new column

    Hi CK76,

    This worked like a charm. I super super appreciate the help and input!

    Thank you!

+ 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. Replies: 0
    Last Post: 05-12-2020, 12:36 PM
  2. Replies: 9
    Last Post: 02-14-2018, 05:34 AM
  3. VBA Adding In Pivot Table Instead of Shifting Column Over
    By pmoehrin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2017, 09:32 PM
  4. Adding numbers in shifting column
    By JHC in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2015, 03:31 AM
  5. Replies: 0
    Last Post: 08-14-2012, 09:42 AM
  6. Shifting an AVERAGE formula down automatically
    By Iron Mike in forum Excel General
    Replies: 5
    Last Post: 06-21-2011, 12:09 PM
  7. permutationally shifting the function of a row one column
    By Chriswmwhite in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-02-2009, 07:44 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