Finding from a List

levy8450

New Member
Joined
Nov 29, 2008
Messages
19
I've got a simple sounding problem. I have a list of common name suffixes (e.g. Jr., Ph.d, J.D., etc). I have a long list of full names. I want to search and see if any of the suffixes on my list are in the name. If so, I want to parse the name into part 1 (everything but the suffix) and part 2 (just the suffix).

I can do all the parsing, but I can't think of a formula that will look at the name and tell me if any of the suffixes are in the name, and which one.

Of course I can brute force it by creating a massively long formula that searches for each term, but I want to try to use a formula that uses a list.

Any solutions?

Thanks.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Tough on a number of levels. For starters, how clean is the original list? Can it include PHD and PHd, MD and M.D.? You might have to include many combinations for the same suffix in order to find them all. And how is the suffix delimited? Comma, space, or what?

You can try filtering using "contains", or the RIGHT() command to find the right x number of characters, but that would also be inconsistant.

You could use text to columns to split the field into columns using space as a delimiter, and sorting by the right column. Problem here is names like Mary Ann Smith PHD, which will throw the suffix into the the 4th column while John Jackson MD will throw the suffix into the third column.
 
Upvote 0
The list has about 50 suffixes, and every time a new one comes up, I can add it. So I'm not worried about having Ph.D but not PhD etc.

If I have a name like "Mr. Alan Louis MD" what I would like is to look through my list of 50 suffixes and find that the name includes one of them - MD. Then I can parse accordingly.

It does get complicated in that some suffixes can have a space in the suffix, such as "M.S. Ed." So I can't just look at the last set of characters after the last space.

I realize that Excel may not be able to do this, and also that there are a number of workarounds, like having lots of columns or one massive formula.
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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