Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Text to Columns Update/ Replace Formula

Masond3
8 - Asteroid

Hi All, 

Having a mental block 

I have a column called "Name" within that name field i have up to 5 names being captured all separated by Space.

 

 

Name
GARETH MICHAEL MARRINER JOHNSON
GARETH MICHAEL MARRINER 
GARETH MICHAEL 

GARETH MICHAEL MARRINER JOHNSON MASON

 

I have performed "text to columns" which has split each name into corresponding new columns. 

 

I would like to get the first word, and last word of each row to be populated into Columns called (First Name, and Last Name) As shown below 

NameFirst NameLast Name
GARETH MICHAEL MARRINER JOHNSONGARETHJOHNSON
GARETH MICHAEL MARRINER GARETHMARRINER 
GARETH MICHAEL GARETHMICHAEL 

GARETH MICHAEL MARRINER JOHNSON MASON

GARETHMASON


Looking forward to your helo 

 

Many thanks 

Masond3

5 REPLIES 5
rzdodson
12 - Quasar

@Masond3 in a Formula tool, insert the following

 

First Name

 

 

GetWord([Name], 0)

 

 

Last Name

 

 

GetWord([Name], CountWords([Name])-1)

 

 

Solution.png

Cremo
7 - Meteor

Hi @Masond3 

personally I will simply use a formula tool and the "get word" function, as attached. Let me know if it helps you.

 

 
 

Screenshot 2024-04-23 154652.png

 

Cremo
7 - Meteor

Sorry @rzdodson , have not seen you already answered with same solution :)

rzdodson
12 - Quasar

No worries, @Cremo! Great minds think alike.

binuacs
21 - Polaris

@Masond3 Another approach

image.png

Labels
Top Solution Authors