+ Reply to Thread
Results 1 to 8 of 8

How to Get the Average of First 5 Non-Blank Cells in a Column?

  1. #1
    Registered User
    Join Date
    03-24-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    How to Get the Average of First 5 Non-Blank Cells in a Column?

    Hi - I'm brand new to the forum but know there is someone that can help..

    I have a problem and I found a good explanation of something similar here:

    http://www.excelforum.com/excel-gene...-a-column.html

    In the original posting the following formula solves the problem (attached) TestData.xlsx

    B1: =AVERAGE(INDEX(B3:B100,MATCH(TRUE,B3:B100<>0,0)):INDEX(B3:B100,MATCH(TRUE,B3:B100<>0,0)+4))

    What I would like to return is the average of the 1st 5 values, but what if a number of cells after the first value were also blank

    I hope this makes sense and hope you can help

    Thanks

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to Get the Average of First 5 Non-Blank Cells in a Column?

    Try this array formula**:

    =AVERAGE(E3:INDEX(E3:E90,SMALL(IF(ISNUMBER(E3:E90),ROW(E3:E90)),5)-ROW(E3)+1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    03-24-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: How to Get the Average of First 5 Non-Blank Cells in a Column?

    Thank you Tony

    Fantastic - I was having real trouble with this, seems simple now

    thanks again


  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to Get the Average of First 5 Non-Blank Cells in a Column?

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

  5. #5
    Registered User
    Join Date
    03-24-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: How to Get the Average of First 5 Non-Blank Cells in a Column?

    Tony

    Just one more thing - obviously I can replace the AVERAGE function with MIN/MAX etc.

    Is there a function to enable me to take the 5th populated cell?

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to Get the Average of First 5 Non-Blank Cells in a Column?

    Try this...

    Data Range
    A
    B
    C
    1
    ------
    ------
    ------
    2
    1
    5
    3
    4
    5
    2
    6
    3
    7
    8
    9
    4
    10
    11
    12
    13
    5
    14
    6
    15
    7


    This array formula** entered in C2:

    =INDEX(A:A,SMALL(IF(A2:A15<>"",ROW(A2:A15)),5))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

  7. #7
    Registered User
    Join Date
    03-24-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: How to Get the Average of First 5 Non-Blank Cells in a Column?

    Tony

    Great stuff - thanks for all your help

    I can now work your responses into my target doc

    Thanks again!!

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to Get the Average of First 5 Non-Blank Cells in a Column?

    Good deal. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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: 14
    Last Post: 03-24-2014, 08:09 PM
  2. Replies: 4
    Last Post: 11-20-2013, 10:16 PM
  3. 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
  4. [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
  5. 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