General Discussions

Discuss any topics that are not product-specific here.
SOLVED

To covert text to columns and then arrange each values in each rows

ANANDPRABHU
6 - Meteoroid

Hi All,

 

Please see below the input and the expected output. Can you help with a workflow to accomplish this use case?My data is currently separated using pipe and available in one cell of an excel.The values should be separated and each values should then be arranged one after another in each individual cell (not in a particular order though).

 

Input:

Col A
123|326|789|569|
000|999|663
336|445
972|971273|27275
416|98537|985374
9715|98696|98697
246|989042|9890
8|1100|11136|11183|1084|1094|11|115|11136|1110|11|10130|1113|1

 

Output:

123
000
336
972
416
9715
246
8
326
999
445
971273
98537
98696
989042
1100
789
663
27275
985374
98697
9890
11136
569
11183
1084
1094
11
115
11136
1110
11
10130
1113
1

 

6 REPLIES 6
RishiK
Alteryx
Alteryx

@ANANDPRABHU I have used the Text to Columns tool to parse out the data into rows by a specific delimiter (|) in your case.

RishiK_0-1627024278046.png


Does the attached workflow produce the output you require?

atcodedog05
22 - Nova
22 - Nova

Hi @RishiK 

 

Interesting, I am wondering why isnt the last pipe generating a null row. It usually does with column though

 

atcodedog05_0-1627026203777.png

 

Hope this helps : )

RishiK
Alteryx
Alteryx

@atcodedog05 that's probably because there is no space or value after the last |

ANANDPRABHU
6 - Meteoroid

Thank you. That worked but how about this use case? 

 

Each value in 'col A' separated by pipe corresponds to its value in 'col B' in same order. For example, AAA in the first row corresponds to 123; BB to 326; CCC to 789 and FFF to 569. I need the output as give below. Can you help?

Input:

 

Col ACol B
AAA|BB|CCC|FFF123|326|789|569|
RRR|EEE|TTT000|999|663
ZZZ|EEE336|445
MM|RR|QQQ972|971273|27275
TTT|GGG|EEE416|98537|985374

 

Output:

 

Col ACol B
AAA123
BB326
CCC789
FFF569
RRR0
EEE999
TTT663
ZZZ336
EEE445
MM972
RRR971273
QQQ27275
TTT416
GGG98537
EEE985374
atcodedog05
22 - Nova
22 - Nova

Hi @ANANDPRABHU 

 

You can split the 2 columns separately and join on position using join tool like below.

 

Workflow:

atcodedog05_0-1627032589514.png

 

Hope this helps : )

 

ANANDPRABHU
6 - Meteoroid

Yes it worked. Thanks All!

Labels