Hi all,
I think this might be a simple question, however I am new to Alteryx so hopefully someone could help me. I tried to use text to columns but not sure what to do with "174 Apple Valley Mn" and "768324 Prior Lake Mn". Thanks
Input
| 087 Greenwood In |
| 079 Chanhassen Mn |
| 116 Chanhassen Mn |
| 163 Chanhassen Mn |
| 076 Monticello Mn |
| 076 Monticello Mn |
| 157 Buffalo Mn |
| 171 Buffalo Mn |
| 174 Apple Valley Mn |
| 768324 Prior Lake Mn |
Ouput
| 87 | Greenwood | In |
| 79 | Chanhassen | Mn |
| 116 | Chanhassen | Mn |
| 163 | Chanhassen | Mn |
| 76 | Monticello | Mn |
| 76 | Monticello | Mn |
| 157 | Buffalo | Mn |
| 171 | Buffalo | Mn |
| 174 | Apple Valley | Mn |
| 768324 | Prior Lake | Mn |
Solved! Go to Solution.
There are probably a few ways that you can tackle this, but based on your comment about being new, let's stick w/ text to columns and do some simple concats Vs some more complex regex (but that is another feasible option).
Use the TtC tool, split into 4 columns instead of 3, and then simply use a logical concat for those with the extra space.
Thats the high-level framework - give me a sec, and Ill post a visual
Welcome to Alteryx @tww!
Check out the Parsing Tools --> Split to Columns
Go to Help --> Sample Workflows --> One tool at a time --> Parse --> Text to Columns (also see REGEX)
In the meantime, you can also use Regex + the formulas below in the Formula tool (you can use one formula tool, but I'm using many to step through for you 😎)
I hope you find it helpful - Cheers!
Thank you @martinding , I heard Regex Tool is fairly power. It is a good time for me to learn.
Thank you @Amilley for the solution.
Thank you @RobertOdera for the solution.
You're most welcome @tww!
