+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Help with a lookup that will return multiple occurrences

  1. #1
    Registered User
    Join Date
    12-08-2009
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007
    Posts
    3

    Help with a lookup that will return multiple occurrences

    Hi,
    I'm trying to figure out how to do a lookup that will return multiple occurrences. I searched the forums and tried to manipulate a function that was used to answer someone else's question, but it isn't working properly. Attached is a sample of what I'm trying to do. There are 2 sheets List and Flags. I would like to lookup the Number (Column C on List) and return all the Codes (Column H on Flags) in cells k-whatever on the List sheet. Hopefully, that made sense. The formulas I have in List K2:R4 and Flags J2:J24 are the formulas I was trying to make work. If I can get those to work that would be fine or if there is a better way to do it that would be great too. Thanks in advance for any guidance you can provide.
    Attached Files Attached Files
    Last edited by PHo1010; 12-11-2009 at 12:56 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help with a lookup that will return multiple occurrences

    In K2 enter: =COUNTIF(Flags!$B$2:$B$24,$C2) and copy down.. you can hide this column. It is a counter.

    In L2: =IF(COLUMNS($A$1:A$1)>$K2,"",INDEX(Flags!$H$2:$H$24,SMALL(IF(Flags!$B$2:$B$24=$C2,ROW(Flags!$B$2:$B$24)-ROW(Flags!$B$2)+1),COLUMNS($A$1:A$1))))

    confirmed with CTRL+SHIFT+ENTER not just ENTER and copied down and across as far as needed.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    12-08-2009
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Help with a lookup that will return multiple occurrences

    Perfect. Thank you so much!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help with a lookup that will return multiple occurrences

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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