+ Reply to Thread
Results 1 to 5 of 5

Make list from lookup/if without gaps between hits

  1. #1
    Forum Contributor
    Join Date
    05-20-2015
    Location
    Stockholm
    MS-Off Ver
    2013
    Posts
    307

    Make list from lookup/if without gaps between hits

    I have a list of names from B2:B300 IN C2:C300 I put an "S" if that person makes a sale.

    In A:A i want a list of only the people that has a sale. But how do I get them to overlook gaps.

    If 5 people from the list of 300, I want those names in A2:A7 etc.

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Make list from lookup/if without gaps between hits

    Use this formula in A2-
    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    copy down....



    Column A Formula Column A result Column C Column D
    =IFERROR(INDEX(B:B,SMALL(INDEX(IF($C$2:$C$300="S",ROW($C$2:$C$300),""),0),ROW(A1))),"") Sourabh Sourabh S
    =IFERROR(INDEX(B:B,SMALL(INDEX(IF($C$2:$C$300="S",ROW($C$2:$C$300),""),0),ROW(A2))),"") Jack Sachin
    =IFERROR(INDEX(B:B,SMALL(INDEX(IF($C$2:$C$300="S",ROW($C$2:$C$300),""),0),ROW(A3))),"") Mathews Hansemand
    =IFERROR(INDEX(B:B,SMALL(INDEX(IF($C$2:$C$300="S",ROW($C$2:$C$300),""),0),ROW(A4))),"") Mike Jack S
    =IFERROR(INDEX(B:B,SMALL(INDEX(IF($C$2:$C$300="S",ROW($C$2:$C$300),""),0),ROW(A5))),"") Albert
    =IFERROR(INDEX(B:B,SMALL(INDEX(IF($C$2:$C$300="S",ROW($C$2:$C$300),""),0),ROW(A6))),"") Robert
    =IFERROR(INDEX(B:B,SMALL(INDEX(IF($C$2:$C$300="S",ROW($C$2:$C$300),""),0),ROW(A7))),"") Mathews S
    =IFERROR(INDEX(B:B,SMALL(INDEX(IF($C$2:$C$300="S",ROW($C$2:$C$300),""),0),ROW(A8))),"") Mike S


    EDIT-FORMULA CORRECTED
    Last edited by sourabhg98; 02-25-2016 at 04:21 AM.
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    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,408

    Re: Make list from lookup/if without gaps between hits

    ... should be

    =IFERROR(INDEX(B:B,SMALL(INDEX(IF($C$2:$C$300="S",ROW($C$2:$C$300),""),0),ROW(A1))),"")

  4. #4
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Make list from lookup/if without gaps between hits

    Quote Originally Posted by JohnTopley View Post
    ... should be

    =IFERROR(INDEX(B:B,SMALL(INDEX(IF($C$2:$C$300="S",ROW($C$2:$C$300),""),0),ROW(A1))),"")
    oops sorry for that error...

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

    Re: Make list from lookup/if without gaps between hits

    Try this...

    Data Range
    A
    B
    C
    1
    Name
    Name
    Status
    2
    Connie
    Bill
    3
    Tom
    4
    Tracy
    5
    Connie
    S
    6
    Tom
    S
    7
    8
    Pete
    9
    Tracy
    S
    10


    This array formula** entered in A2:

    =IFERROR(INDEX(B:B,SMALL(IF(C$2:C$300="S",ROW(C$2:C$300)),ROWS(A$2:A2))),"")

    ** 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.

    Copy down until you get blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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 make cells transfer data to another sheet once it hits 100%
    By patsalwayshere in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-02-2015, 05:04 PM
  2. Replies: 1
    Last Post: 02-03-2015, 01:23 AM
  3. [SOLVED] Make #N/A create gaps in a graph, Excel 2010
    By nsv in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 05-30-2013, 03:17 AM
  4. [SOLVED] EXCEL Formula to show howmany hits when checking list against data?
    By sem in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 06-14-2012, 10:14 PM
  5. Multiple hits on lookup
    By elinielsen in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-02-2012, 02:57 PM
  6. Lookup of Cells and transferring them to make a list
    By Dan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-02-2006, 10:40 AM
  7. Replies: 0
    Last Post: 08-26-2005, 01:58 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