cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • See how to interactively organize and restructure data for analysis. Register for May 29 webinar, 2pm US ET.

Discussions

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

New column from existing one with dashes and periods

Hi, I am new to programming in general and am having trouble with this one column in JMP. I want to create a new column from one that is autogenerated, but my if/ then statements aren't working. I think its because sometimes there are words and spaces within the strings of numbers and often dashes and periods. I am looking for only one number within a string of numbers. Sometimes it will be at the front, sometimes sandwiched in the middle. I want to find the strings with the number 399 in there somewhere, all others will be standard. Can someone help? Example:

documentrequisition
100-399-214.2399
399-214.2-199399
100-100-344standard
214.2-100 and 598-100-399399
1 REPLY 1
jthi
Super User

Re: New column from existing one with dashes and periods

You can for example use If + Contains in a Formula

If(Contains(:document, "399"),
	"399"
,
	"Standard"
);

 

-Jarmo

Recommended Articles