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
wjalford
Level III

Need to remove part of a string starting with (

I have a string in a cell that has the format AB1234(Name).  I would like to remove everthing past the 4.  The result would be each cell under the column LOT_NUMBER would be AB1234.  I have tried the word function ;  for each row(word(1,:LOT_NUMBER,"("));  This did not work.  Can you please give me a recommendation.

 

Regards,

 

Wayne

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Need to remove part of a string starting with (

As Mark indicates, you need to replace the value in the column, not just find it

 for each row(
     :LOT_NUMBER = word(1,:LOT_NUMBER,"(")
);
Jim

View solution in original post

3 REPLIES 3

Re: Need to remove part of a string starting with (

You do not store the result of each iteration where you could see it. How do you know it is not working?

txnelson
Super User

Re: Need to remove part of a string starting with (

As Mark indicates, you need to replace the value in the column, not just find it

 for each row(
     :LOT_NUMBER = word(1,:LOT_NUMBER,"(")
);
Jim
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Need to remove part of a string starting with (

Your code partially works, it just lacks the assignment. Try this:

For Each Row(:LOT_NUMBER = Word(1, :LOT_NUMBER, "("));

 

Recommended Articles