cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
dn610
Level III

Separating a string value

abc.01.d06 Failure to protect
abc-cd.06.d07 Inadequate dependency of stories
ab.01.d05 Unavailability of personnel

 

Hi - I need to separate the above values into separate columns. One column will contain the numerical values and the other will contain the text so for example for the first row, I want abc.01.d06 in the first column and Failure to protect in the second column. Can someone please help? 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Separating a string value

This can be done in many different ways. Below are fairly interactive methods

 

Starting table

jthi_0-1706549582527.png

 

Quick formula:

Right click on your column and take first word

jthi_5-1706549850188.png

jthi_6-1706549861282.png

 

 

Using recode:

Select your column and go to Cols/Recode, find extract segment (could also use First word)

jthi_1-1706549606414.png

Use slider to pick correct parts and check from bottom that you are getting correct result

jthi_2-1706549641792.png

and you will end up with column like

jthi_3-1706549668191.png

 

Getting the text:

You can then repeat the recode process to create other column or create a column which substitute the newly created values from original column with missing string (might want to add extra space there or wrap it with Trim Whitespace() function)

Substitute(:Column 1, :Column 1 2, "")

jthi_4-1706549784298.png

 

 

-Jarmo

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Separating a string value

Select the column in question

Then go to

     Cols=>Utilities=>Text to Columns

 

It will create new columns based upon the selected delimiter.  In your case, us a space to get what you want.

Jim
jthi
Super User

Re: Separating a string value

This can be done in many different ways. Below are fairly interactive methods

 

Starting table

jthi_0-1706549582527.png

 

Quick formula:

Right click on your column and take first word

jthi_5-1706549850188.png

jthi_6-1706549861282.png

 

 

Using recode:

Select your column and go to Cols/Recode, find extract segment (could also use First word)

jthi_1-1706549606414.png

Use slider to pick correct parts and check from bottom that you are getting correct result

jthi_2-1706549641792.png

and you will end up with column like

jthi_3-1706549668191.png

 

Getting the text:

You can then repeat the recode process to create other column or create a column which substitute the newly created values from original column with missing string (might want to add extra space there or wrap it with Trim Whitespace() function)

Substitute(:Column 1, :Column 1 2, "")

jthi_4-1706549784298.png

 

 

-Jarmo
dn610
Level III

Re: Separating a string value

Thank you!