+ Reply to Thread
Results 1 to 7 of 7

Average for the last 8 days.

  1. #1
    Forum Contributor
    Join Date
    06-20-2016
    Location
    Los Angeles/Thailand
    MS-Off Ver
    2016
    Posts
    250

    Average for the last 8 days.

    Hello, lets say I have 360 days of data (I insert data everyday) and I want to know what is the average of the last 8 days are. Is there a formula for that?

    This is a formula I use for the last digit in the column: =LOOKUP(9.99999999999999E+307,A1:A100) Maybe there is a formula just like this but for average.
    Attached Files Attached Files
    Last edited by sovietchild; 02-20-2017 at 03:37 PM.

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Average for the last 8 days.

    =average(index(b2:b18,match(max(a2:a18)-8,a2:a18,)):b18)

  3. #3
    Forum Contributor
    Join Date
    06-20-2016
    Location
    Los Angeles/Thailand
    MS-Off Ver
    2016
    Posts
    250

    Re: Average for the last 8 days.

    Quote Originally Posted by tim201110 View Post
    =average(index(b2:b18,match(max(a2:a18)-8,a2:a18,)):b18)
    It worked. Thank you so much!

  4. #4
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,287

    Re: Average for the last 8 days.

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

  5. #5
    Forum Contributor
    Join Date
    06-20-2016
    Location
    Los Angeles/Thailand
    MS-Off Ver
    2016
    Posts
    250

    Re: Average for the last 8 days.

    Quote Originally Posted by Czeslaw View Post
    Test the this formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This formula gave me an error. "There is a problem with this formula."

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,146

    Re: Average for the last 8 days.

    Try

    =SUM(INDEX(B2:B18*(A2:A18=LARGE(A2:A18,{1,2,3,4,5,6,7,8})),0))/8

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,336

    Re: Average for the last 8 days.

    Another alternative ... create a Named Formula called nrLast, for example:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then you can use the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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: 13
    Last Post: 09-22-2016, 09:18 AM
  2. Creative way to count days worked or average days worked...
    By bcrockett101 in forum Excel General
    Replies: 1
    Last Post: 08-09-2016, 12:16 PM
  3. Average over the last 30 days
    By Timmays in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-14-2014, 01:30 AM
  4. Average Score for last 30 days, 60 days, etc.
    By kublaieod in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-02-2013, 05:00 AM
  5. Help on count the number of days in between dates and then average number of days
    By Barbara Excel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2013, 12:13 PM
  6. Average of last 10 days
    By DonMashak in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-04-2011, 11:56 PM
  7. Average a range IF within 30 days
    By earthtodan in forum Excel General
    Replies: 10
    Last Post: 06-05-2008, 11:50 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