cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

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