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.
  • See how to access JMP Marketplace - and - find, create & share add-ins to extend your JMP. Watch video.

Discussions

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

How to repeat values in a column when they are strings

Hi everyone!

I've used this script below for numerical values

If( Is Missing( :Name( "For Calc - Data1" ) ),
	Lag( :Name( "Data1" ), 1 ),
	:Name( "For Calc - Data1" )
)


With the resulting table looking like this

For Calc - Data1 Data1
12 12
  12
  12
33 33
  33

 

 

However I can't apply this same formula to a column that has strings or characters to result in the following data table because I get an error saying that the value must be Numeric.

For Calc - Data2 Data2
A A
  A
  A
B B
  B

 

 

Is there a workaround or an alternative formula I can use to achieve this?

1 REPLY 1
txnelson
Super User

Re: How to repeat values in a column when they are strings

Here is the method I use

If( Row() == 1,
	x = :"For Calc - Data2"n
);
If( As Column( "For Calc - Data2" ) != "",
	x = :"For Calc - Data2"n
);
x;
Jim

Recommended Articles