cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • Use JMP Clinical with CDISC-compliant data. Review studies, ID safety and efficacy signals & communicate findings with interactive graphics. Register to see how. Aug. 27, 2 pm US ET.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
AdamChoen
Level IV

copy column cell to different column

hi 

I'm trying to copy all row that is gender "male" from column "age" to column "gender"

this syntax doesn't work.

appreciate any help!

age is a character column (Young, adult etc.)

dt <<Select Where(:gender== "M");
:age << Get Value;
:gender << paste;
Thanks, Adam
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: copy column cell to different column

Here is the code that I would use....others may have better

Names Default To Here( 1 );
dt = Current Data Table();

selRows = dt << Get Rows Where( :gender == "M" );
For( i = 1, i <= N Rows( selRows ), i++,
	:gender[selRows[i]] = Char( :age[selRows[i]] )
);
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: copy column cell to different column

Here is the code that I would use....others may have better

Names Default To Here( 1 );
dt = Current Data Table();

selRows = dt << Get Rows Where( :gender == "M" );
For( i = 1, i <= N Rows( selRows ), i++,
	:gender[selRows[i]] = Char( :age[selRows[i]] )
);
Jim
AdamChoen
Level IV

Re: copy column cell to different column

working great thank you 

Thanks, Adam

Recommended Articles