+ Reply to Thread
Results 1 to 17 of 17

vlookup with multiple matches displayed in one cell

  1. #1
    Forum Contributor
    Join Date
    07-15-2015
    Location
    germany
    MS-Off Ver
    365
    Posts
    100

    vlookup with multiple matches displayed in one cell

    Dear,

    I have data set like this

    1 pear
    3 apple
    3 whatever
    3 chicken
    6 mc
    8 fruit
    8 meat

    outcome Vlookup on 3 should be in one cell: (apple, whatever, chicken)

    what kind of formula do I need to use?

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: vlookup with multiple matches displayed in one cell

    Row\Col
    A
    B
    1
    Data outCome
    2
    pear
    3
    apple apple
    4
    whatever whatever
    5
    chicken chicken
    6
    mc
    7
    fruit
    8
    meat


    B2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Contributor
    Join Date
    07-15-2015
    Location
    germany
    MS-Off Ver
    365
    Posts
    100

    Re: vlookup with multiple matches displayed in one cell

    Thank you,

    I have added a document to explain. I would like to have in cel B16 not only "Chicken" but "kip" and "," and "haan" as well.

    regards

  4. #4
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: vlookup with multiple matches displayed in one cell

    No excel sample file is attached.
    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Forum Contributor
    Join Date
    09-18-2015
    Location
    Republic of Korea
    MS-Off Ver
    2010
    Posts
    314

    Re: vlookup with multiple matches displayed in one cell


  6. #6
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: vlookup with multiple matches displayed in one cell

    Try

    B16
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Drag down!

  7. #7
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: vlookup with multiple matches displayed in one cell

    ok if you want to separated by comma then

    C2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Copy down

    B16
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    07-15-2015
    Location
    germany
    MS-Off Ver
    365
    Posts
    100

    Re: vlookup with multiple matches displayed in one cell

    sorry
    did not saw you last comment

  9. #9
    Forum Contributor
    Join Date
    07-15-2015
    Location
    germany
    MS-Off Ver
    365
    Posts
    100

    Re: vlookup with multiple matches displayed in one cell

    wow this is almost perfect.

    If I change in A10 6 into 4, the value in B16 is only "fruit"

    can you help me with that as well?

  10. #10
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: vlookup with multiple matches displayed in one cell

    Then try

    C2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    D2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Copy across

    B16
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    07-15-2015
    Location
    germany
    MS-Off Ver
    365
    Posts
    100

    Re: vlookup with multiple matches displayed in one cell

    1 apple
    1 pear
    2 whatever
    4 chicken
    3 kip
    4 haan
    3 hello
    2 bey
    4 fruit
    3 meat
    1 big
    1 cat


    4 fruit; fruit


    this works better but not yet good. I guess the order is important. Can you exclude that?

  12. #12
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: vlookup with multiple matches displayed in one cell

    Quote Originally Posted by jaapaap View Post
    1 apple
    1 pear
    2 whatever
    4 chicken
    3 kip
    4 haan
    3 hello
    2 bey
    4 fruit
    3 meat
    1 big
    1 cat


    4 fruit; fruit


    this works better but not yet good. I guess the order is important. Can you exclude that?
    ahahah lolzz yeah shorting must be done before do so

  13. #13
    Registered User
    Join Date
    09-05-2017
    Location
    new delhi
    MS-Off Ver
    2013
    Posts
    21

    Re: vlookup with multiple matches displayed in one cell

    make a macro under which( using advance filter option with "criteria and list" then copy filtered items and then paste it with transpose in any location then use concatenate formula to combined transposed cell.

  14. #14
    Forum Contributor
    Join Date
    07-15-2015
    Location
    germany
    MS-Off Ver
    365
    Posts
    100

    Re: vlookup with multiple matches displayed in one cell

    I prefer to solve it with a formula. I do not know much about marcro's.

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

    Re: vlookup with multiple matches displayed in one cell

    You will need a UDF for this... But don't panic about macros, it's run just like a formula.

    Please Login or Register  to view this content.
    How to install your new code
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Press Alt+F11 to open the Visual Basic Editor
    Choose Insert > Module
    Edit > Paste the macro into the module that appeared
    Close the VBEditor
    Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
    [B][I]


    Then use this array formula:

    =ConcatAll(IF(A2:$A$13=A16,$B$2:$B$13,""),", ")


    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    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

  16. #16
    Forum Contributor
    Join Date
    07-15-2015
    Location
    germany
    MS-Off Ver
    365
    Posts
    100

    Re: vlookup with multiple matches displayed in one cell

    it works for me, thanks a lot

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

    Re: vlookup with multiple matches displayed in one cell

    You're welcome... Thanks for the rep.

+ 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. [SOLVED] vlookup with multiple matches
    By guy123456 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-01-2017, 12:13 PM
  2. Help with Vlookup and Multiple Matches
    By ITRIEDEL in forum Excel General
    Replies: 5
    Last Post: 01-06-2016, 11:19 PM
  3. [SOLVED] VLookup with multiple matches
    By prudential in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-30-2014, 07:07 AM
  4. [SOLVED] VLookup for multiple matches
    By Anjukeerthi in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-19-2014, 04:51 PM
  5. VLOOKUP with multiple matches
    By SUPPO_USN in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2012, 12:05 AM
  6. Multiple matches on VLOOKUP
    By [email protected] in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2005, 01:06 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