+ Reply to Thread
Results 1 to 10 of 10

How to Return 1st, 2nd,3rd Number in a Column Containing Blanks?

  1. #1
    Registered User
    Join Date
    12-28-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2013
    Posts
    31

    How to Return 1st, 2nd,3rd Number in a Column Containing Blanks?

    Please see the attached example. Basically, in a random number list containing blanks, I would like a formula that can return the 1st, 2nd, 3rd, etc, number. Is there a way to do this?

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: How to Return 1st, 2nd,3rd Number in a Column Containing Blanks?

    Put in M4 and copied down

    =IFERROR(INDEX($E$2:$E$19,AGGREGATE(15,6,(ROW($E$2:$E$19)-MIN(ROW($E$2:$E$19))+1)/($E$2:$E$19<>""),ROW(A1))),"")

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How to Return 1st, 2nd,3rd Number in a Column Containing Blanks?

    Another way ... similar. Try entering this number in M4 and filling down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  4. #4
    Forum Contributor
    Join Date
    10-30-2003
    Location
    Singapore
    MS-Off Ver
    Excel 2019
    Posts
    197

    Re: How to Return 1st, 2nd,3rd Number in a Column Containing Blanks?

    Another non-array formula option in M4, filling down :

    =IFERROR(INDEX(E:E,MATCH(0,MMULT(COUNTIF(M$3:M3,E$2:E$19)+(E$2:E$19=0),1),0)+1),"")

    Regards
    Bosco

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How to Return 1st, 2nd,3rd Number in a Column Containing Blanks?

    @ Bosco.

    Nice solution. Would you explain why MMULT?

    =IFERROR(INDEX(E:E,MATCH(0,COUNTIF(P$3:P3,E$2:E$19)+(E$2:E$19=0),0)+1),"")

    returns the same results.

    I.e. COUNTIF(P$3:P3,E$2:E$19)+(E$2:E$19=0)

    and

    MMULT(COUNTIF(M$3:M3,E$2:E$19)+(E$2:E$19=0),1)

    return the same array.

    What am I missing?

  6. #6
    Registered User
    Join Date
    12-28-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: How to Return 1st, 2nd,3rd Number in a Column Containing Blanks?

    Thanks for all the great answers!

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How to Return 1st, 2nd,3rd Number in a Column Containing Blanks?

    Your welcome. Thanks for the feedback and added rep.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  8. #8
    Forum Contributor
    Join Date
    10-30-2003
    Location
    Singapore
    MS-Off Ver
    Excel 2019
    Posts
    197

    Re: How to Return 1st, 2nd,3rd Number in a Column Containing Blanks?

    Quote Originally Posted by FlameRetired View Post
    @ Bosco.

    Nice solution. Would you explain why MMULT?

    =IFERROR(INDEX(E:E,MATCH(0,COUNTIF(P$3:P3,E$2:E$19)+(E$2:E$19=0),0)+1),"")

    returns the same results.

    I.e. COUNTIF(P$3:P3,E$2:E$19)+(E$2:E$19=0)

    and

    MMULT(COUNTIF(M$3:M3,E$2:E$19)+(E$2:E$19=0),1)

    return the same array.

    What am I missing?
    Hi FlameRetired,

    1] Without MMULT, the formula should be array enter

    {=IFERROR(INDEX(E:E,MATCH(0,COUNTIF(P$3:P3,E$2:E$19)+(E$2:E$19=0),0)+1),"")}

    2] With adding MMULT, the formula become non-array (normal) enter

    =IFERROR(INDEX(E:E,MATCH(0,MMULT(COUNTIF(P$3:P3,E$2:E$19)+(E$2:E$19=0),1),0)+1),"")

    Regards
    Bosco

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How to Return 1st, 2nd,3rd Number in a Column Containing Blanks?

    Ah! OK. Thank you.

  10. #10
    Registered User
    Join Date
    06-04-2018
    Location
    Europe
    MS-Off Ver
    Office365
    Posts
    78

    Re: How to Return 1st, 2nd,3rd Number in a Column Containing Blanks?

    Hello,

    These formulas are array type and if we use functions that are able to work natively with arrays, we no longer use the CTRL + SHIFT + ENTER key combination, but as we say are array functions and their use in a larger range, they slow down the calculation (and recalculation) formulas, even if the CTRL + SHIFT + ENTER combination is not used.

+ 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. Search Through a Column to Find Match, ignore blanks return Value
    By lmc2016 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-13-2016, 11:39 AM
  2. Replies: 7
    Last Post: 12-06-2015, 05:40 PM
  3. Return most common text from column cells with formula while ignoring blanks
    By rosco01995 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-29-2014, 03:55 AM
  4. [SOLVED] Return the number of blanks across a specified number of columns
    By shepherdc2814 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-19-2013, 05:24 PM
  5. Replies: 8
    Last Post: 05-24-2013, 05:37 PM
  6. Scan a Column A (numbers and blanks) and copy its contents WITHOUT BLANKS into Column B
    By bighandsam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2012, 05:16 PM
  7. Count the total number of rows in a column, with blanks included
    By jblumGRT in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-22-2009, 06:55 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