Vlookup with Contains

Chuggs

New Member
Joined
Feb 17, 2011
Messages
1
I'm trying to put together a Vlookup, but i'm having problems as the lookup value contains the data i want to lookup rather than being an exact match.

In Sheet1 Column G i have the following (just a sample)

2880-00000064-METZROTH V 011111<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
Accrual - Brunning<o:p></o:p>
2880-00000074-O'SHEA B 011111<o:p></o:p>
142776 SOZANSKY S<o:p></o:p>
A1000-00005272-L McLeavy-M13.12-020<o:p></o:p>
A1000-00006546-S G Ager-Exps-06.01-


These are all Surnames


In Sheet2 Column B I have a list of all of the possible surmanes which could be contained in the Sheet1 Column G (283 rows)


In Sheet2 Column A I have the full names in the format i require.


Is there a formula or some vba i can use to say 'if a cell in Sheet1 column G contains the value of any cell in Sheet2 Column B then return the value of the corresponding Cell in Sheet2 ColumnA int Sheet1 Column I


e.g if lookup value contains Sheet2 B2, reurn Sheet2 A2


If any one can help this would be much appreciated.


Chuggs
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,215,816
Messages
6,127,038
Members
449,356
Latest member
tstapleton67

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