+ Reply to Thread
Results 1 to 7 of 7

VLOOKUP Partial matches when searched text is longer than actual text

  1. #1
    Registered User
    Join Date
    08-12-2014
    Location
    Fremont
    MS-Off Ver
    2013
    Posts
    19

    VLOOKUP Partial matches when searched text is longer than actual text

    I am trying to design a search bar in Excel. I do not want to use an add-in, such as the Fuzzy Lookup Add-in.

    Cell AU1 is my designated search bar. Say the search bar is designed to be used to search movie titles.

    Columns A to Z contain a relational database of movies, such as movie titles (in column A) and additional movie information, such as year of release, director, studio, etc. (columns B to Z). This table is titled "Movies".

    Say I want to be able to search a movie title in AU1--for example, I want to be able to type "GoodFellas" into AU1 and automatically populate AU2-AU27 with information on the movie GoodFellas from the "Movies" table.

    I want AU2 to show the movie title ("GoodFellas") if I search "GoodFellas" in AU1 (additionally, the subsequent cells will populate with "Scorsese" and "1990" etc., information from the "Movies" table). In addition, I want to be able to type in "Goodf" in AU1 and have the cells automatically populate with relational information on "GoodFellas".

    So effectively, I have populated AU2 with the following formula (the leading conditional merely ensures that when AU1 is empty, the other cells are also empty):
    Please Login or Register  to view this content.
    However, this code does not work if I want to search "Good Fellas" or "GoodFellasss" (i.e., AU2 is automatically populated with "#N/A" instead of "GoodFellas").

    Some guidance would be appreciated!

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: VLOOKUP Partial matches when searched text is longer than actual text

    Instead of VLOOKUP I used INDEX / MATCH. MATCH takes wildcards. This formula turns your column wise date base into row wise output. It's this formula in AU2 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you try it please let us know if it does what you want.
    Last edited by FlameRetired; 02-23-2015 at 06:19 PM. Reason: changed formula

  3. #3
    Registered User
    Join Date
    08-12-2014
    Location
    Fremont
    MS-Off Ver
    2013
    Posts
    19

    Re: VLOOKUP Partial matches when searched text is longer than actual text

    The INDEX/MATCH formula appear to be doing the same thing my aforementioned VLOOKUP formula is doing when I type in an longer incorrect match (e.g., Goodfellassss or Good Fellas) but seems to be handle shorter incorrect matches (e.g., Goodf) , but instead of showing a "#N/A", there is a blank, which I suppose is caused by the fact that there is an error.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: VLOOKUP Partial matches when searched text is longer than actual text

    If there is a way to handle a longer or misspelled entry I am not aware of it.

    instead of showing a "#N/A", there is a blank, which I suppose is caused by the fact that there is an error.
    You are quite correct about that. If you want the errors to show through delete the 'IFERROR(' and the ',"")' parts.

    By the way...as with VLOOKUP MATCH is going to only return the first match found. If you want multiple returns say on "Good "....."Good Fellas", "Good Times....." etc. that is going to require an array formula copied down perhaps hundreds of rows. Please let us know.
    Last edited by FlameRetired; 02-23-2015 at 08:47 PM.

  5. #5
    Registered User
    Join Date
    08-12-2014
    Location
    Fremont
    MS-Off Ver
    2013
    Posts
    19

    Re: VLOOKUP Partial matches when searched text is longer than actual text

    Thanks for the response. However, I would like to know if there is a way to look up a longer or misspelled entry.

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: VLOOKUP Partial matches when searched text is longer than actual text

    I've never seen one that I recall. Nesting some kind of very involved MID function combinations into MATCH might work, but I would scarcely know where to begin. Perhaps someone else will join in and correct me on all of this. Sorry I couldn't help you with that part.

  7. #7
    Registered User
    Join Date
    02-05-2015
    Location
    Edmonton, Alberta
    MS-Off Ver
    2013
    Posts
    70

    Re: VLOOKUP Partial matches when searched text is longer than actual text

    you could try to error catch and have it look up one less letter everytime until it gets what it is looking for.

    =iferror(vlookup,AU1,table range,2),iferror(vlookup(Left(AU1,10),table range,2),iferror(vlookup(Left(AU1,9),table range,2),iferror(vlookup(Left(AU1,8),table range,2),iferror(vlookup(Left(AU1,7),table range,2),iferror(vlookup(Left(AU1,6),table range,2)....ect and then if that still comes up with an error you can have a second column in your table range that has key words and have on of the error catching lookup that


    it probably isnt what you want it to do but it might work

+ 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] Finding partial text matches compared to a range
    By grifta67 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-17-2014, 04:38 PM
  2. [SOLVED] Count partial text matches in adjacent column
    By joshkvt in forum Excel General
    Replies: 6
    Last Post: 08-11-2014, 12:01 PM
  3. Formula that recoginizes partial text matches and concatenates them
    By Shadefalcon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-02-2014, 04:11 PM
  4. [SOLVED] Finding text amongst longer text using vlookup (Take 2)
    By coach.32 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-04-2013, 09:08 AM
  5. [SOLVED] Finding text amongst longer text using vlookup
    By coach.32 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-04-2013, 04:17 AM

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