Alteryx Designer Desktop Discussions

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

Text to Column Help

Hi i am having data in excel sheet following format.. i want to split into  two columns can you help me 

 

Column

C232 Incubes ltd

C534 Gnet LT

Broadband,inc.

 

Out put should be in following format 

column1                   column2

C232                        Incubes ltd

C534                        Gnet LT

Broadband,inc.

7 REPLIES 7
Emil_Kos
17 - Castor
17 - Castor

Hi @yashavantharaja_thim,

 

I have used text to column + formula tool in order to make it work.

 

Emil_Kos_0-1610913874990.png

 

 

The output:

Emil_Kos_1-1610913883774.png

Please mark my post as a solution if this was helpful!

 

Thanks Emll_Kos, i split the column into column1 and column2 using Test to column ,but in formula column how to  combine .. i am new user.

 

using test to column i am getting below 

 

column                           column1               column2 

C232 Incubes ltd           C232                     Incubes ltd 

C534 Gnet Lt                C534                     Gnet Lt 

Boradband,inc.             Boradband,           inc.  

Emil_Kos
17 - Castor
17 - Castor

Hi @yashavantharaja_thim ,

 

Apologies I forgot to add an attachment.

It is not working i am not getting expected i am here attached what  i tried please correct me if i did anything wrong

Emil_Kos
17 - Castor
17 - Castor

Hi @yashavantharaja_thim,

 

Please kindly sent the input file. 

vizAlter
12 - Quasar

Hi @yashavantharaja_thim — Try this solution:

 

vizAlter_0-1610916100479.png

 

FindString([Column], " ") function will identify the 1st position of the Space:

Left([Column], FindString([Column], " "))

 

IF FindString([Column], " ") < 1 THEN 
	Null() 
ELSE 
	Trim(Right([Column], Length([Column])-FindString([Column], " "))) 
ENDIF

 

BretCarr
10 - Fireball

It looks as though you may want to use REGEX to parse your data into the columns since you seem to have a customerID that appears from time to time but not always?

 

If you do a REGEX on your data, choose method PARSE and use the following REGEX pattern code:

 

^(C\d{3})?\s?(.*)$

 

Does that do the trick? Are there more variants in your data that this doesn’t account for?

 

REGEXing has become a hobby of mine so let me know!

 

If this helps, don’t forget to mark it as a solution.

Labels