+ Reply to Thread
Results 1 to 16 of 16

Vlookup table array matching with multiple value in single cell separated by comma.

  1. #1
    Registered User
    Join Date
    03-03-2015
    Location
    KL, Malaysia
    MS-Off Ver
    2010
    Posts
    5

    Vlookup table array matching with multiple value in single cell separated by comma.

    Hi,

    I have a table looks like this

    ------------A----------------------B
    _____________________________
    1 | apple, orange ------------| aaa
    2 | grape, kiwi, strawberry-| bbb
    3 | mango, watermelon -----| ccc
    4 | cherry ------------------- | ddd

    and i would like to get this result


    apple-----| aaa
    kiwi-------| bbb
    grape-----| bbb
    mango----| ccc

    I have limited knowledge on vlookup, is there anyway to complete it using vlookup?
    any help will be grateful.
    Last edited by kannoy; 03-04-2015 at 04:04 AM.

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    can you pls attach sample excel file with desired result
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    Hi,
    welcome to the Forum.

    Assuming your data is in range A1:B4 and your lookup values are in the range D1:D4, then try this......

    In E1
    Please Login or Register  to view this content.
    and copy down.


    apple, orange a apple a
    grape, kiwi, strawberry b kiwi b
    mango, watermelon c grape b
    cherry d mango c
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    03-03-2015
    Location
    KL, Malaysia
    MS-Off Ver
    2010
    Posts
    5

    Lightbulb Re: Vlookup table array matching with multiple value in single cell separated by comma.

    Quote Originally Posted by sktneer View Post
    Hi,
    welcome to the Forum.

    Assuming your data is in range A1:B4 and your lookup values are in the range D1:D4, then try this......

    In E1
    Please Login or Register  to view this content.
    and copy down.


    apple, orange a apple a
    grape, kiwi, strawberry b kiwi b
    mango, watermelon c grape b
    cherry d mango c

    Wow. this work like a charm.
    Really thank you so much.

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    You're welcome.

    If that takes care of your original question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.

  6. #6
    Registered User
    Join Date
    02-28-2015
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    21

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    Dear,

    Put ( apple ) in the cell C1, and the formula in the D1.....try =vlookup("*"&C1&"*";A1:B4;2;0)... and see the result...

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    Yes, it will work. Why didn't I think of that simple way. lol
    Maybe I need a break.

  8. #8
    Registered User
    Join Date
    03-03-2015
    Location
    KL, Malaysia
    MS-Off Ver
    2010
    Posts
    5

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    Hi,
    There a bug on this formula.
    if i want to vlookup
    "apple a" but i have an entry pineapple on top of apple, it will match the pineapple first and return me pineapple result instead going down matching apple.
    is there any workaround i can fix it?
    Thanks.

  9. #9
    Registered User
    Join Date
    02-28-2015
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    21

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    Dear,


    try to attached some file.....with your question...

  10. #10
    Registered User
    Join Date
    03-03-2015
    Location
    KL, Malaysia
    MS-Off Ver
    2010
    Posts
    5

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    test.xlsx

    Hi, for your reference.
    Million Thanks.

  11. #11
    Registered User
    Join Date
    02-28-2015
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    21

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    Dear,


    try to put a space before (apple)..... but this just works if the word (apple) never were the first word.
    for exemplo..

    grape, apple, strawberry -it works
    mango, apple -it works
    apple, banana -it doesn´t works - just if there is also a space, this way it works

    Sorry, this is all i can do...

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

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    Please check this file, hope this works
    Attached Files Attached Files

  13. #13
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    Try this to see if you get the correct output......

    In H2
    Please Login or Register  to view this content.
    and copy down.
    Attached Files Attached Files

  14. #14
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    Quote Originally Posted by azumi View Post
    Please check this file, hope this works
    If Apple comes first and PineApple comes later in column A then your formula will give PineApple result in Both the cases

  15. #15
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    =VLOOKUP("* "&G2&",*",CHOOSE({1,2},INDEX(" "&$A$2:$A$5&",",0),$B$2:$B$5),2,0)
    Try this and copy towards down

  16. #16
    Registered User
    Join Date
    03-03-2015
    Location
    KL, Malaysia
    MS-Off Ver
    2010
    Posts
    5

    Re: Vlookup table array matching with multiple value in single cell separated by comma.

    Really thank you so much guys.
    It's been a very good learning session for me.
    Again. million thanks.

+ 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] Using comma separated values in a single cell
    By joerobb in forum Excel General
    Replies: 7
    Last Post: 01-16-2015, 08:45 AM
  2. Match a Value from a single-cell, comma separated list
    By secondchild12 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-24-2014, 06:16 PM
  3. vlookup multiple values in single cell separated by spaces
    By aimeecrystalaid in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 12-15-2013, 10:23 PM
  4. Return Y/N after matching from multiple lookup values separated by comma
    By indoglans in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-16-2011, 03:13 PM
  5. Column/cells to single cell comma separated data?
    By egeorge4 in forum Excel General
    Replies: 1
    Last Post: 04-27-2007, 03:53 PM

Tags for this Thread

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