<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to split a column cells into different columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1677#M1677</link>
    <description>Not sure how I can split a column of cells into different columns.  For example I have this ONE column with both First and Last names as one cell&lt;BR /&gt;&lt;BR /&gt;    Name&lt;BR /&gt;1 Lee, Bob&lt;BR /&gt;2 Miller, Mike&lt;BR /&gt;3 Smith, Jack&lt;BR /&gt;&lt;BR /&gt;Not split this one column into Two columns, one of First, and second column of Last&lt;BR /&gt;&lt;BR /&gt;   Last        First&lt;BR /&gt;1 Lee         Bob&lt;BR /&gt;2 Miller      Mike&lt;BR /&gt;3 Smith     Jack</description>
    <pubDate>Wed, 21 Apr 2010 21:23:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-21T21:23:12Z</dc:date>
    <item>
      <title>How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1677#M1677</link>
      <description>Not sure how I can split a column of cells into different columns.  For example I have this ONE column with both First and Last names as one cell&lt;BR /&gt;&lt;BR /&gt;    Name&lt;BR /&gt;1 Lee, Bob&lt;BR /&gt;2 Miller, Mike&lt;BR /&gt;3 Smith, Jack&lt;BR /&gt;&lt;BR /&gt;Not split this one column into Two columns, one of First, and second column of Last&lt;BR /&gt;&lt;BR /&gt;   Last        First&lt;BR /&gt;1 Lee         Bob&lt;BR /&gt;2 Miller      Mike&lt;BR /&gt;3 Smith     Jack</description>
      <pubDate>Wed, 21 Apr 2010 21:23:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1677#M1677</guid>
      <dc:creator />
      <dc:date>2010-04-21T21:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1678#M1678</link>
      <description>There are a couple ways to tackle this.  The easiest way is to use the "Word" function.&lt;BR /&gt;Assuming your full names are in Column "Name":&lt;BR /&gt;&lt;BR /&gt;Last Name: Word( 1, :Name, ", " )&lt;BR /&gt;First Name: Word( 2, :Name, ", " )&lt;BR /&gt;&lt;BR /&gt;The harder way is to do it with the "munger" function :)&lt;/img&gt;</description>
      <pubDate>Wed, 21 Apr 2010 22:46:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1678#M1678</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-21T22:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1679#M1679</link>
      <description>Since I'm bored:&lt;BR /&gt;&lt;BR /&gt;First Name: Munger( :Name, Munger( :Name, 1, ", " ) + 2, -1 )&lt;BR /&gt;Last Name: Munger( :Name, 0, Munger( :Name, 1, ", " ) - 1 )</description>
      <pubDate>Wed, 21 Apr 2010 22:49:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1679#M1679</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-21T22:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1680#M1680</link>
      <description>Thanks.  I am a newbie to JMP.  Actually my situation is a little more complicated.  Each of my row has a column of data that contains varying # of data which I want to split out.  Pls see below&lt;BR /&gt;&lt;BR /&gt;    Name            Classes&lt;BR /&gt;1   Jack                a, b, f, h&lt;BR /&gt;2 Bill                    b&lt;BR /&gt;3 Steve                 e, r, t&lt;BR /&gt;4 Mary                  a, b, c, d, e&lt;BR /&gt;&lt;BR /&gt;Since the # of classes each person has taken are varying, what is the correct way to break the classes column out into something like below&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;   Name       Classes&lt;BR /&gt;1 Jack</description>
      <pubDate>Wed, 21 Apr 2010 23:53:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1680#M1680</guid>
      <dc:creator />
      <dc:date>2010-04-21T23:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1681#M1681</link>
      <description>Thanks. I am a newbie to JMP. Actually my situation is a little more complicated. Each of my row has a column of data that contains varying # of data which I want to split out. Pls see below.  The Classes column is one column with "a,b,f" being one character string&lt;BR /&gt;&lt;BR /&gt;Name Classes&lt;BR /&gt;1 Jack a, b, f, &lt;BR /&gt;2 Bill b&lt;BR /&gt;3 Steve e, r, t&lt;BR /&gt;4 Mary a, b, c, d&lt;BR /&gt;&lt;BR /&gt;Since the # of classes each person has taken are varying, what is the correct way to break the classes column out into something like below&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Name Classes&lt;BR /&gt;1 Jack a&lt;BR /&gt;2 Jack b&lt;BR /&gt;3 Jack f&lt;BR /&gt;4 Bill b&lt;BR /&gt;5 Steve e&lt;BR /&gt;6 (and so on).&lt;BR /&gt;&lt;BR /&gt;Appreciate any insight.  Thanks</description>
      <pubDate>Wed, 21 Apr 2010 23:56:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1681#M1681</guid>
      <dc:creator />
      <dc:date>2010-04-21T23:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1682#M1682</link>
      <description>I suggest you export  your file as tab-delimited text and then reimport (select "Open" from File menu and "Open as: Data (using preview)") using comma and spaces as field delimiters. &lt;BR /&gt;Then you use "Stack" from the tables menu and choose to stack all columns in your imported data table except the name column (make sure "drop non-stacked columns" is un-checked). &lt;BR /&gt;&lt;BR /&gt;This would result in the expanded table you wanted, except for a number of empty rows. Those can easily be deleted after sorting.</description>
      <pubDate>Thu, 22 Apr 2010 11:00:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1682#M1682</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2010-04-22T11:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1683#M1683</link>
      <description>&lt;P&gt;I'm doing something very similar, where several columns have lists of varying lengths. Here's a solution adapted from my code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;current_dataset = current data table();
dataset_name = current_dataset &amp;lt;&amp;lt; Get Name;

name_list = {};
class_list = {};

nR = NRow(current_dataset);

For (i = 1, i &amp;lt;= nR, i++,

split_classes = Words(Column("Classes"), ",");
nclasses = NItems(split_classes);

/* Add the parsed classes to the longer class list */
insertinto(class_list, split_classes);

/ Add Name to its list multiple times (same # as # of classes) */
For (k = 1, k &amp;lt;= nclasses, k++,
insertinto(name_list, (current_dataset:Name));
)
);

/* OK now we've created lists in memory containing Name and class data. Now
convert these to a dataset */
class_dataset = New Table(dataset_name || " (Classes)");
class_dataset &amp;lt;&amp;lt; Minimize Window;

class_dataset &amp;lt;&amp;lt; New Column("Name", Character);
class_dataset &amp;lt;&amp;lt; New Column("Class", Character);

/* Add lists to their respective columns */
class_dataset:Name &amp;lt;&amp;lt; values(name_list);
class_dataset:Class &amp;lt;&amp;lt; values(class_list);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Oct 2018 19:34:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1683#M1683</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2018-10-26T19:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1684#M1684</link>
      <description>My posting got chopped off for some reason.  I'm working with tech support to resolve the issue.</description>
      <pubDate>Fri, 23 Apr 2010 13:24:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1684#M1684</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2010-04-23T13:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1685#M1685</link>
      <description>&lt;P&gt;OK I figured out how to post. Here's the code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;current_dataset = current data table();
dataset_name = current_dataset &amp;lt;&amp;lt; Get Name;

name_list = {};
class_list = {};

nR = NRow(current_dataset);

For (i = 1, i &amp;lt;= nR, i++,

// Parse the list of Classes using , as the delimiter. Take out extra spaces
split_classes = Words(substitute(Column("Classes")[i], ", ", ","), ",");
nclasses = NItems(split_classes);

// Add the parsed classes to the longer class list
insertinto(class_list, split_classes);

// Add Name to its list multiple times (same # as # of classes)
For (k = 1, k &amp;lt;= nclasses, k++,
insertinto(name_list, (current_dataset:Name)[i]);
)
);

// OK now we've created lists in memory containing Name and class data. Now
// convert these to a dataset
class_dataset = New Table(dataset_name || " (Classes)");
//class_dataset &amp;lt;&amp;lt; Minimize Window;

class_dataset &amp;lt;&amp;lt; New Column("Name", Character);
class_dataset &amp;lt;&amp;lt; New Column("Class", Character);

// Add lists to their respective columns
class_dataset:Name &amp;lt;&amp;lt; values(name_list);
class_dataset:Class &amp;lt;&amp;lt; values(class_list);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;\&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 19:35:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1685#M1685</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2018-10-26T19:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1686#M1686</link>
      <description>Apology for being late in thanking everyone.  I ended up doing something similar to the first suggestion of using excel to break up the contents on one column and then import everything into JMP and then used stack function.  I am not good at writing formulas or scripts, so good thing to learn from the more knowledgeable.  Thanks again.</description>
      <pubDate>Mon, 03 May 2010 17:10:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/1686#M1686</guid>
      <dc:creator />
      <dc:date>2010-05-03T17:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/46007#M26232</link>
      <description>&lt;P&gt;If you're using JMP 12 or later you can use &lt;A href="http://www.jmp.com/support/help/Restructure_Data.shtml" target="_blank" rel="noopener noreferrer noopener noreferrer noopener noreferrer"&gt;&lt;FONT color="#0168b2"&gt;Cols -&amp;gt; Utilities -&amp;gt; Text to Columns&lt;/FONT&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" style="width: 430px;"&gt;&lt;SPAN class="lia-message-image-wrapper"&gt;&lt;IMG title="12569_JMPScreenSnapz034.png" class="lia-media-image" alt="12569_JMPScreenSnapz034.png" src="https://community.jmp.com/t5/image/serverpage/image-id/3609i56652B6ECEACB62F/image-size/medium?v=v2&amp;amp;px=400" border="0" /&gt;&lt;SPAN class="lia-messages-message-image"&gt;&lt;!-- ngIf: link --&gt;&lt;I class="lia-fa lia-fa-search-plus lia-media-lightbox-trigger"&gt;&lt;/I&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're using JMP 11 or earlier you can get the add-in, &lt;A href="https://community.jmp.com/docs/DOC-6082" target="_blank"&gt;&lt;FONT color="#0168b2"&gt;Text to Columns, Version 2&lt;/FONT&gt;&lt;/A&gt;​, which does the same thing as the now, built-in function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to do this by hand, either with JSL or the Formula Editor, you'll find the &lt;A href="http://www.jmp.com/support/help/Character_Functions_2.shtml" target="_blank" rel="noopener noreferrer noopener noreferrer noopener noreferrer"&gt;&lt;FONT color="#0168b2"&gt;Word()&lt;/FONT&gt;&lt;/A&gt; function handy, as described by thechadd&lt;/P&gt;
&lt;P&gt;Last Name: Word( 1, :Name, ", " )&lt;BR /&gt;First Name: Word( 2, :Name, ", " )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" style="width: 845px;"&gt;&lt;SPAN class="lia-message-image-wrapper"&gt;&lt;IMG title="12570_JMPScreenSnapz035.png" class="lia-media-image" alt="12570_JMPScreenSnapz035.png" src="https://community.jmp.com/t5/image/serverpage/image-id/3610iB155EE3029F0C7AF/image-size/medium?v=v2&amp;amp;px=400" border="0" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 17:38:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/46007#M26232</guid>
      <dc:creator>laura_archer</dc:creator>
      <dc:date>2017-10-16T17:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/81540#M36966</link>
      <description>&lt;P&gt;Looking for an extension of Text to Columns/Word function.I have a path in a column -&lt;/P&gt;&lt;P&gt;Z:\abc\def\foldername\filefolder\filename.&lt;/P&gt;&lt;P&gt;I need to extract 3 things from this path -&lt;/P&gt;&lt;P&gt;1.foldername&lt;/P&gt;&lt;P&gt;2.Path until file folder&lt;/P&gt;&lt;P&gt;3.file name&lt;/P&gt;&lt;P&gt;I am basically getting this data from data base.Need to post process it and fill an excel template.&lt;/P&gt;&lt;P&gt;I tried text to columns;going through multiple iterations will get me there but its very inefficient.&lt;/P&gt;&lt;P&gt;Looking for recommendation.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 17:19:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/81540#M36966</guid>
      <dc:creator>ENTHU</dc:creator>
      <dc:date>2018-10-26T17:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a column cells into different columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/81541#M36967</link>
      <description>Take a look at the Word() function and the Substr() function.  And you could also use a regular expression with Regex() function</description>
      <pubDate>Fri, 26 Oct 2018 17:36:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-split-a-column-cells-into-different-columns/m-p/81541#M36967</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-10-26T17:36:35Z</dc:date>
    </item>
  </channel>
</rss>

