<?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 Re: Select a group of cells in a column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41223#M24046</link>
    <description>&lt;P&gt;The point I was making in showing you the last piece of code, was that you can specify a matrix [........] of values (rows) that you can use to select the rows you want. &amp;nbsp;There are a multitude of ways to populate a matrix. &amp;nbsp;The capabilites of populating matricies are listed in&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==Books==&amp;gt;Scripting Guide&lt;/P&gt;
&lt;P&gt;Given your current code, I would probably use an Index() function. &amp;nbsp;It would make the code far more efficient. &amp;nbsp;Also, using Wait(0); will force the processing to finish the selection before moving on, rather than having to guess on how much time you need to wait.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
L = N Rows( dt ); // number of rows
//For( i = 3, i &amp;lt;= L, i++,
dt &amp;lt;&amp;lt; Select Rows( Index( 3, L ) );
dt &amp;lt;&amp;lt; Go To( :Height );
//);
Wait( 0 );
dt &amp;lt;&amp;lt; Select Matching Cells();&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 26 Jun 2017 22:08:16 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2017-06-26T22:08:16Z</dc:date>
    <item>
      <title>Select a group of cells in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/39595#M23149</link>
      <description>&lt;P&gt;Hi, I have table with thousands of rows. I need to be able to select a group of cells in one column, so I could copy it into another table.&amp;nbsp;for example for Column: "Test3 (VOLTS)" only I need to copy cells highlighted in yellow from row 4 thru row 18 using JSL code.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JMP.jpg" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/6277i88276E593C242982/image-size/large?v=v2&amp;amp;px=999" role="button" title="JMP.jpg" alt="JMP.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 22:16:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/39595#M23149</guid>
      <dc:creator>SamH</dc:creator>
      <dc:date>2017-05-24T22:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Select a group of cells in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/39597#M23151</link>
      <description>&lt;P&gt;Here is a simple example&amp;nbsp; of&amp;nbsp;one way&amp;nbsp;to do it&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$sample_data\big class.jmp" );

// copy the names from row 2-6
NameCpy = dt:name[Index( 2, 6 )];

dt2 = New Table( "copied", New Column( "new name", character ) );
dt2 &amp;lt;&amp;lt; add rows( 5 );

// copy to new table
For( i = 1, i &amp;lt;= 5, i++,
	dt2:new name[i] = NameCpy[i]
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you actually have physical rows that are selected, you can easily get their row number with a:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt&amp;lt;&amp;lt;get selected rows&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 23:31:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/39597#M23151</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-05-24T23:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Select a group of cells in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/39828#M23314</link>
      <description>&lt;P&gt;Thanks that should work, I tried with Big class file.&lt;/P&gt;&lt;P&gt;Much appreciated&lt;/P&gt;&lt;P&gt;Sam.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 21:23:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/39828#M23314</guid>
      <dc:creator>SamH</dc:creator>
      <dc:date>2017-05-31T21:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Select a group of cells in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41214#M24038</link>
      <description>&lt;P&gt;Hi Jim, how can I select a range of cells withing one column?&lt;/P&gt;&lt;P&gt;for example if I want to select cell 2 thourgh cell 19 within the same column.&lt;/P&gt;&lt;P&gt;Because I want to use this selection to be able to do "Select Matching Cells" within the same column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 21:24:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41214#M24038</guid>
      <dc:creator>SamH</dc:creator>
      <dc:date>2017-06-26T21:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Select a group of cells in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41215#M24039</link>
      <description>&lt;P&gt;Here is the example for "Select Matching Cells" taken from&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Scripting Index&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; Select Rows( [1, 2, 3, 4] );
dt &amp;lt;&amp;lt; Go To( :Height );
Wait( 2 );
dt &amp;lt;&amp;lt; Select Matching Cells();&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Jun 2017 21:34:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41215#M24039</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-06-26T21:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Select a group of cells in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41216#M24040</link>
      <description>&lt;P&gt;Hi Jim, instead of hand picking what cells to select, can I pick a range let's say 2-19?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 21:38:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41216#M24040</guid>
      <dc:creator>SamH</dc:creator>
      <dc:date>2017-06-26T21:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Select a group of cells in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41217#M24041</link>
      <description>&lt;P&gt;or row 12 thru 40 in column "height"&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 21:45:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41217#M24041</guid>
      <dc:creator>SamH</dc:creator>
      <dc:date>2017-06-26T21:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Select a group of cells in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41219#M24042</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="col.jpg" style="width: 378px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/6601iE0B783AEA27BE912/image-size/large?v=v2&amp;amp;px=999" role="button" title="col.jpg" alt="col.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 21:47:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41219#M24042</guid>
      <dc:creator>SamH</dc:creator>
      <dc:date>2017-06-26T21:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Select a group of cells in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41220#M24043</link>
      <description>Jim, I am trying to automate this process, because the files I am dealing with could have 1k-2k rows. if I have to specify every row, my code will be so many pages.&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Jun 2017 21:50:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41220#M24043</guid>
      <dc:creator>SamH</dc:creator>
      <dc:date>2017-06-26T21:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select a group of cells in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41221#M24044</link>
      <description>&lt;P&gt;Jim, I figured it out, here is the code it works.&lt;/P&gt;&lt;P&gt;Names Default To Here( 1 );&lt;BR /&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );&lt;BR /&gt;L = N Rows( dt ); // number of rows&lt;BR /&gt;For( i = 3, i &amp;lt;= L, i++,&lt;BR /&gt;dt &amp;lt;&amp;lt; Select Rows( i, L );&lt;BR /&gt;dt &amp;lt;&amp;lt; Go To( :Height );&lt;BR /&gt;);&lt;BR /&gt;Wait( 2 );&lt;BR /&gt;dt &amp;lt;&amp;lt; Select Matching Cells();&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 21:56:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41221#M24044</guid>
      <dc:creator>SamH</dc:creator>
      <dc:date>2017-06-26T21:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Select a group of cells in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41223#M24046</link>
      <description>&lt;P&gt;The point I was making in showing you the last piece of code, was that you can specify a matrix [........] of values (rows) that you can use to select the rows you want. &amp;nbsp;There are a multitude of ways to populate a matrix. &amp;nbsp;The capabilites of populating matricies are listed in&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==Books==&amp;gt;Scripting Guide&lt;/P&gt;
&lt;P&gt;Given your current code, I would probably use an Index() function. &amp;nbsp;It would make the code far more efficient. &amp;nbsp;Also, using Wait(0); will force the processing to finish the selection before moving on, rather than having to guess on how much time you need to wait.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
L = N Rows( dt ); // number of rows
//For( i = 3, i &amp;lt;= L, i++,
dt &amp;lt;&amp;lt; Select Rows( Index( 3, L ) );
dt &amp;lt;&amp;lt; Go To( :Height );
//);
Wait( 0 );
dt &amp;lt;&amp;lt; Select Matching Cells();&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Jun 2017 22:08:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41223#M24046</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-06-26T22:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select a group of cells in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41224#M24047</link>
      <description>&lt;P&gt;Thanks Jim.&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 22:21:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-a-group-of-cells-in-a-column/m-p/41224#M24047</guid>
      <dc:creator>SamH</dc:creator>
      <dc:date>2017-06-26T22:21:53Z</dc:date>
    </item>
  </channel>
</rss>

