Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Jan 2007
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Average of last ten rows in a list (2003)

    Can I create a formula to calculate the average of the last ten items in a column? The list may vary in length from day to day - but I always want the average of just the last ten items. Can anyone help please? Thanks in advance.

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Average of last ten rows in a list (2003)

    If your numbers were in column A starting at A1, you can use:
    <code>=AVERAGE(OFFSET(A1,COUNTA(A:A)-1,0,-10,1))</code>
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Average of last ten rows in a list (2003)

    And if you want to accomodate for less than 10 items being present:
    <code>
    =AVERAGE(OFFSET(A1,COUNTA(A:A)-MIN(COUNTA(A:A),10),0,MIN(COUNTA(A:A),10),1))
    </code>
    (Cf sdckapr's formulas in <post:=698,857>post 698,857</post:>)

  4. #4
    Star Lounger
    Join Date
    Jan 2007
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Average of last ten rows in a list (2003)

    Perfect. Thank you both very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •