+ Reply to Thread
Results 1 to 3 of 3

Lookup Question - Possible to match if the cell *contains* the lookup value?

Hybrid View

  1. #1
    Registered User
    Join Date
    04-24-2008
    Posts
    85

    Lookup Question - Possible to match if the cell *contains* the lookup value?

    Hello all - 2nd post today, I had such good help with the first one I thought I'd try again. Thanks again!

    I'm trying to bring in some values into my data set.
    I have a column which I'm using to lookup that contains a ref#.

    For example,
    AB123
    AB128
    AC234
    AJ542
    etc...

    In my lookup table I don't always have an exact 1:1 match, and some cells contain more than one ref#.

    For example,
    AB123
    AB128, AB234 (this is the value in one cell, comma-seperated)
    AC234, AJ542

    Right now if I lookup AB128, I get #N/A as there isn't an exact match with the entire cell.
    Is there a way I can lookup AB128 within the cell, and if it is present, return the value I need?

    The ref# is unique and will only appear in the table once.
    Any help would be appreciated.

    Thanks!
    Last edited by AdamParker; 07-15-2011 at 03:31 PM. Reason: Solved

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

    Re: Lookup Question - Possible to match if the cell *contains* the lookup value?

    With VLOOKUP and INDEX/MATCH you can use wildcards.

    e.g.

    =VLOOKUP("*"&A1&"*",X:Y,2,FALSE)

    will lookup up the value in A1 in column X and find it amongst the strings whether it is the beginning, end or middle of the strings within that range and return the corresponding Y column value.
    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
    04-24-2008
    Posts
    85

    Re: Lookup Question - Possible to match if the cell *contains* the lookup value?

    Brilliant - thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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