Excel 2012 - Vlookup with text

Johnny Thunder

Well-known Member
Joined
Apr 9, 2010
Messages
693
Office Version
  1. 2016
Platform
  1. MacOS
Hello all


I need help with a funky lookup

In Column A & B

Cell A2 - Aegis IT LTD
Cell B2 - Aegis LTD INC.

I need a vlookup that will look in column A and see the "Aegis IT LTD" and then look in column B and because the "AEGIS LTD INC." is pretty darn close to correct return that as my answer.


The problem I am having is that for this example I could easily say look for "Aegis" and don't look at anything else. This type of Logic won't work for other Names in my criteria because in some cases the name could have been like "IT Aegis" and just for an example I used the whole "Aegis" thing.


The formula if possible should just look to Column A and see what is in there and find the closest match it can from Column B. Hope this is possible. Thanks for all the help!

Johnny
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Well, other than using the 'True' option when formulating the hlookup, this is pretty hard. If the data is consistent in that the first 5 letters are what you want to match then you can match on a left function

=left(text,5)

but if the text is inconsistent then you're probably out of luck. You might be able to make tables of similar values and then using if statements construct your hlookup so that if it doesn't find one value it goes to the next, but I'd have to know more about your data to know if this is viable.
 
Upvote 0
The function will be a Vlookup.

And the Left or Right function won't work. I was hoping there might be a way to use Wild Cards "*" to get the results I needed but I am not sure how to say look in cell A2 and use what you see in there and add "*" to the beginning and end of the contents of the cell and match to the cell in B2.

The data runs down A1 =Header Row. Cells A2:A400 matching to cells B2:B400.
 
Upvote 0

Forum statistics

Threads
1,215,474
Messages
6,125,025
Members
449,204
Latest member
LKN2GO

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