+ Reply to Thread
Results 1 to 9 of 9

Average of the last 3 numbered cells

  1. #1
    Registered User
    Join Date
    08-23-2005
    Posts
    53

    Average of the last 3 numbered cells

    Hi,
    Could anyone help please I have a grid example below, I need to know the average for the last 3 numbered cells in each row? which will change weekly

    Week 1 Week 2 Week 3 Week 4 Week 5 Week 6
    A 157 621 142 458
    B 150 155 90
    C 456 568 584 452

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    One way...

    Please Login or Register  to view this content.
    where A1:Z1 is your first row range... you can replace with 1:1 if you want to include entire row.

    formula can be copied down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Average of the last 3 numbered cells

    With your posted data in A1:G4

    This formula returns the average of the last 3 consecutive values in B2:G2:
    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    08-23-2005
    Posts
    53
    Thanks works a treat

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by Ron Coderre
    With your posted data in A1:G4

    This formula returns the average of the last 3 consecutive values in B2:G2:
    Please Login or Register  to view this content.
    Is that something you can work with?

    oOOPS.

    Don't know why I didn't think of using a range instead of 3 arguments...

    Mine would then be:

    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    I prefer the OFFSET function
    Please Login or Register  to view this content.
    ChemistB

  7. #7
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    OFFSET is volatile

    Quote Originally Posted by ChemistB
    I prefer the OFFSET function
    Please Login or Register  to view this content.
    ChemistB
    That's a possibility...with the following caveat:
    The OFFSET function is volatile, so every cell containing OFFSET recalculates
    whenever *any* cell in the workbook recalcs. There is a threshhold where
    the workbook becomes annoyingly sluggish. Consequently, I only use
    OFFSET sparingly and only when necessary.

    This is my latest list of volatile functions:
    RAND, NOW, TODAY, OFFSET, CELL, INDIRECT

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Thanks Ron, I will definitely remember that when working with Offset in the future. Question: What if Offset is used in a defined name? Does it have the same problem?

    Thanks

    ChemistB

  9. #9
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Average of the last 3 numbered cells

    I believe the problem still exists when the OFFSET function is used in a
    defined name. However, by keeping the use of volatile functions to an
    absolute minimum, the impact should be negligible.

+ 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