validate a character string within a cell to a list and return the value found

pschroeder

New Member
Joined
Mar 6, 2012
Messages
10
Office Version
  1. 365
Platform
  1. Windows
I have a text string containing a person's name and need to lookup that person's name in a separate list of names to verify that the person exists in the list. I then need to then return the person's name when found in the list. For example:-

Column 1: Text String​
Column 2: Person's Name
(the required formula)​
Comments​
Text string containing John Citizen. No further text.John Citizen
<--- Formula which returns the person's name from the "List of Names" when a match is found in the "List of Names" for the highlighted text.
Text string containing Bill Jones. No further text.Bill Jones
Text string containing Jane Smith. No further text.(not found)
Text string containing Michael King. No further text.Michael King

Using the first record as the example.......
The name John Citizen exists within the string "Text string containing John Citizen. No further text." Lookup the table "List of Names" and see if "John Citizen" is in the list. If "John Citizen" is in the List of Names, populate the formula cell with the name found in the List of Names i.e. return the value "John Citizen".

"List of Names" table looks like this:-
List of Names​
Bill Jones
Michael King
John Citizen

Note. The name "Jane Smith" is not listed in the "List of Names". The required formula needs to accommodate instances where the name contained within the string is not found in the "List of Names".

Would appreciate your help in the providing a formula (for column-2) I could use to achieve the above please.

Thanks.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,215,415
Messages
6,124,768
Members
449,187
Latest member
hermansoa

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