How to flip last name, first name middle name
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, I am new to alteryx. Is there a formula I can use to flip last name and first name? In Excel I was using the following formula [=MID(A2&" "&A2,FIND(" ",A2)+1,LEN(A2))].
My data has a column for full name, where the format is "Castoral, Darren Andre" or "Lopez, Anna M" and I would like to have it flipped to be "Darren Andre Castoral" and "Anna M Lopez". Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @ramosjaqueline12 ,
I would suggest using the 'Text To Columns' tool to split the name where there's a comma, then a formula tool to concatenate them back together int he order you're looking for. Screenshot below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
As with most things in Alteryx, lots of ways to do it. Here's a one-tool example using regular expression attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks so much!
Both suggestions work and even though I am more familiar with Excel it seems like the text to columns solution is way simpler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Nick! I was trying to figure out the RegEx formula but I am still trying to learn about all the options available in Alteryx. This example helps me a lot as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This is so awesome, thank you for posting. I was playing with RegEx the past 2 days but nothing worked right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Exactly the solution I was looking for! Thanks for posting. Does anyone know how to do this with multiple names in one field? Each of the names are separated by a semi-colon ; i.e. Doe, John; Last Name, First Name;
