vlookup values matching on a partial text string

vantilian

New Member
Joined
Mar 3, 2002
Messages
44
I have two worksheets, and I'm trying to use vlookup to retrieve a value from Worksheet 2 by matching on a partial text string. Situation is as follows:

Worksheet 1:

Column A
Elliot & Sons Restaurants
Jan Thomas Company
Taco El Ray

Worksheet 2:

Column A:
El Ray Taco's
Elliot & Sons, Inc.
Jan Thomas Restaurants, LLC

Column B:
15
20
25

I would like to vlookup using the Worksheet 1 / Column A Values, which are text strings, and where there is a partial match to Worksheet 2 / Column A text strings, return the value in Worksheet 2 / Column B. As you can see in the example, the tricky part is getting the vlookup formula to match "Taco El Ray" in Worksheet 1 to "El Ray Taco's" in Worksheet 2.

Another tricky part is trying to avoid matching "Elliot & Sons Restaurants" in Worksheet 1 with "Jan Thomas Restaurants" in Worksheet 2. I guess I will need to restrict the lookup to trying to match the first 10 characters or so of the text string in Worksheet 1 / Column A, to any part of text string in Worksheet 2 / Column A.

As always your help is greatly appreciated.

Cheers,

Russell
 
Thanks for all the suggestions. I'm using Alan's fuzzyvlookup function and it is working fine. I appreciate you all directing me to those solutions.

Cheers,

Russell (y)
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
One last question concerning use of this fuzzyvlookup function: Is there a way to refine the LookupValue (Entry To Be Looked Up) to only considering the first 15 characters of the text string in LookupValue when comparing to the TableArray (Lookup Range)?
 
Upvote 0
Without going into the code, easiest way is to create a new column via =LEFT(OldCell,15) and then apply the UDF to that data set.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top