+ Reply to Thread
Results 1 to 7 of 7

average last 3 cells in a column that are not blank

  1. #1
    Registered User
    Join Date
    12-15-2019
    Location
    Georgia
    MS-Off Ver
    2016
    Posts
    14

    average last 3 cells in a column that are not blank

    Please help - I need a formula to average the last 3 cell values in a column that are not blank.

    Please see attached for an example.

    In the example, the cells referenced are B1 through B14, and the answer should be an average of 13, 17 and 24 (which is 18).

    Thanks for any help/
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,419

    Re: average last 3 cells in a column that are not blank

    You can use:

    =AVERAGE(AGGREGATE(14,6,($B$2:$B$30)/($B$2:$B$30<>""),{1,2,3}))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: average last 3 cells in a column that are not blank

    a few options

    =IF(COUNT($B$2:$B$14)<4,AVERAGE($B$2:$B$14),AVERAGE(MOD(AGGREGATE(14,6,ROW($B$2:$B$14)*10^7/ISNUMBER(B2:B14)+B2:B14,{1;2;3}),10^7)))

  4. #4
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,407

    Re: average last 3 cells in a column that are not blank

    Enter in B16 as Array (paste formula then CONTROL+SHIFT+ENTER:

    =AVERAGE(INDEX(B2:B14,LARGE(IF(B2:B14<>"",ROW(B2:B14)-ROW(B2)+1),3)):B14)

    Hope this helps

    Ochimus
    Last edited by Ochimus; 12-10-2020 at 11:44 AM.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,419

    Re: average last 3 cells in a column that are not blank

    If they're not in ascending order, which will almost certainly be the case:

    =AVERAGE(INDEX(B:B,AGGREGATE(14,6,ROW($B$2:$B$30)/($B$2:$B$30<>""),{1,2,3})))
    Attached Files Attached Files

  6. #6
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: average last 3 cells in a column that are not blank

    The option based on Glenn formula
    =AVERAGE(INDEX(B:B,AGGREGATE(14,6,ROW(B2:B30)/(B2:B30<>""),3)):B30)
    Oh i see the same above but with Large function.

  7. #7
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,547

    Re: average last 3 cells in a column that are not blank

    normal formula
    HTML Code: 
    array formula
    HTML Code: 

+ 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. how to average a value in blank cells in a column between cells with data
    By mitomke in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-25-2019, 10:50 AM
  2. [SOLVED] Auto Average Cells on Either Side of Blank in Column
    By jmjohnston in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-31-2018, 07:34 PM
  3. How to Get the Average of First 5 Non-Blank Cells in a Column?
    By southerk in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-24-2014, 10:01 PM
  4. Replies: 14
    Last Post: 03-24-2014, 08:09 PM
  5. Average the last 10 cells of a dynamic column but ignore blank cells & 0
    By mattadler22 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-13-2013, 11:37 PM
  6. [SOLVED] find blank cells in column and average the cells below
    By desibabuji in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-03-2013, 12:03 PM
  7. Average of next 6 non blank cells in a column.
    By hackboy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-15-2012, 10:44 AM

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