Last Name, First Name
Please HELP!!!!!,
I am trying to take someone's full name and turn it into Last Name, First Name.
ex.
ADAMS, JONAH = ADAMS, JONAH
ADAMS, CHRISTOPHE MICHAEL III = ADAMS, CHRISTOPHE
LEE ADAMS, JONAH MICHAEL III = LEE ADAMS, JONAH
I was able to figure out how to pull everything left of the comma, but can't figure out the first name part. I got close but kept running into an issue due to names having multiple spaces or no middle name
Best Answer
-
This seems to work, but I still think it could be simplified
Last Name =LEFT([Full Name]@row, FIND(",", [Full Name]@row))
Last Name Removed = =SUBSTITUTE(RIGHT([Full Name]@row, LEN([Full Name]@row) - FIND(",", [Full Name]@row) - 1), " ", "!") + "!"
Extra Names Removed = =LEFT([Last Name Removed]@row, FIND("!", [Last Name Removed]@row) - 1)
To do it all in a single formula
Fully Nested = =LEFT([Full Name]@row, FIND(",", [Full Name]@row)) + " " + LEFT(SUBSTITUTE(RIGHT([Full Name]@row, LEN([Full Name]@row) - FIND(",", [Full Name]@row) - 1), " ", "!") + "!", FIND("!", SUBSTITUTE(RIGHT([Full Name]@row, LEN([Full Name]@row) - FIND(",", [Full Name]@row) - 1), " ", "!") + "!") - 1)
Answers
-
This seems to work, but I still think it could be simplified
Last Name =LEFT([Full Name]@row, FIND(",", [Full Name]@row))
Last Name Removed = =SUBSTITUTE(RIGHT([Full Name]@row, LEN([Full Name]@row) - FIND(",", [Full Name]@row) - 1), " ", "!") + "!"
Extra Names Removed = =LEFT([Last Name Removed]@row, FIND("!", [Last Name Removed]@row) - 1)
To do it all in a single formula
Fully Nested = =LEFT([Full Name]@row, FIND(",", [Full Name]@row)) + " " + LEFT(SUBSTITUTE(RIGHT([Full Name]@row, LEN([Full Name]@row) - FIND(",", [Full Name]@row) - 1), " ", "!") + "!", FIND("!", SUBSTITUTE(RIGHT([Full Name]@row, LEN([Full Name]@row) - FIND(",", [Full Name]@row) - 1), " ", "!") + "!") - 1)
-
OMG, OMG, OMG!!! it works!!!!!!! Thank you so much!!!!!!!!!!!!!!!!!!!!!!!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.1K Get Help
- 448 Global Discussions
- 154 Industry Talk
- 504 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 80 Community Job Board
- 513 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!