cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

Select a group of cells in a column

SamH
Level III

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. for example for Column: "Test3 (VOLTS)" only I need to copy cells highlighted in yellow from row 4 thru row 18 using JSL code.

Thanks

JMP.jpg

 

11 REPLIES 11
txnelson
Super User


Re: Select a group of cells in a column

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.  There are a multitude of ways to populate a matrix.  The capabilites of populating matricies are listed in

     Help==Books==>Scripting Guide

Given your current code, I would probably use an Index() function.  It would make the code far more efficient.  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.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
L = N Rows( dt ); // number of rows
//For( i = 3, i <= L, i++,
dt << Select Rows( Index( 3, L ) );
dt << Go To( :Height );
//);
Wait( 0 );
dt << Select Matching Cells();
Jim
SamH
Level III


Re: Select a group of cells in a column

Thanks Jim.

Sam