+ Reply to Thread
Results 1 to 8 of 8

Vlookup Partial Text String

  1. #1
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Vlookup Partial Text String

    Can you provide a formula that looks for the most similar value of a cell (say A2) in column D of a dataset (say D2:E50) and gives the corresponding value that's in column E? It's exactly like a Vlookup only it's looking up the most similar value instead of the exact value --- the vlookup being vlookup(A2,D2:E50,2,false).

    If we need to define "most similar" further, it would either be having the most similar number of letters (this is all text) or at least 7 common letters. The most similar match would be the best...

    Thanks a lot for your help in advanced.

    D
    Attached Files Attached Files
    Last edited by dreicer_Jarr; 05-26-2011 at 08:25 PM.
    ______________________________________
    "Vision without Execution is a Hallucination"
    Edison

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Vlookup Partial Text String

    Can you please attach a dummy workbook?
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Vlookup Partial Text String

    Sure. I added a very dummed down version of what I am doing. Again, just looking for the closest match and then getting the associated value for that match (column E).
    Last edited by dreicer_Jarr; 05-26-2011 at 08:34 PM.

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Vlookup Partial Text String

    Try,

    B3; copy down

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Vlookup Partial Text String

    Interesting, it's working on the dummy sheet but not on the "real" sheet. Does column E have to be numbers? Besides being a lot larger, the only other difference is that column E is text rather than numbers. Any ideas?

  6. #6
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Vlookup Partial Text String

    I also noticed that I got an NA error when I added " XX" after Allen. It would not longer find the closest match -- that too would present a problem in the live environment.

  7. #7
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Vlookup Partial Text String

    he only other difference is that column E is text rather than numbers
    Try this,

    Please Login or Register  to view this content.

    I also noticed that I got an NA error when I added " XX" after Allen. It would not longer find the closest match
    In that case I think VBA is the good way. You need something like Fuzzy Lookup. I am not a good programmer. Hope some one will help you for the VBA.

  8. #8
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Vlookup Partial Text String

    Thanks for your help though! I agree that VBA may be the only choice. A fuzzy lookup is exactly what I am trying to achieve -- though I could specifiy wanting to match a certain amount of characters.

+ 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