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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.