BookmarkSubscribeRSS Feed
InspectahDex
Obsidian | Level 7

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?

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 687 views
  • 0 likes
  • 2 in conversation