I have a dataset with one variable that contains name information along with suffixes and titles. There are also commas and slashes and there are also blanks. It looks like this:
BusinessContact |
Dr. Moon S. Park, FCAP |
Stacy Petersen |
Dr. Andrew Schwartz |
Katie Bova |
Ms. Melissa Guiba |
Mr. Leonard Licina |
OM is Shelly |
W.M. Morrow |
Business Managaer - Sandy Nikaitani |
Mr. Kevin A. Roberts |
Tracy Sawada |
Faith |
Mr. George Newton |
Angie Bugaran |
Chris |
Henry Yim/Kelly Tuamoheloa |
Ms. Merilyn Harris |
Faith |
Gerald McKenna, M.D. |
Mr. Herbert Yim |
Mr. Ira Walton |
Ms. Orianna Skomoroch |
How can I take that column and convert it into two where it's split out by First Name and Last Name with the titles (Mr., Mrs., Ms., Dr.) and suffixes (M.D., FCAP) excluded?
You need to develop a step-by-step clean-up logic. This is an iterative process by trial and error. For example:
1. Remove titles
when that's done
2. split records with several names into several observations
then
3. extract name components as desired
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Save $200 when you sign up by March 14!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.