cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
chandankishor66
Level III

Find few letter and replace whole word

Hello JMP community,

 

I am looking for your help to write a script who can find "PF"  OR "F" from column 1 and put "prefermentor: or "fermentor: name in column 2.

chandankishor66_0-1663916314832.png

Regards,

Chandan

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Find few letter and replace whole word

With the provided information something like this should work and it is quite simple (create new formula column with it):

If(Ends With(:Column1, "PF"),
	"prefermentor",
Ends With(:Column1, "F"),
	"fermentor"
,
	""
);
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Find few letter and replace whole word

With the provided information something like this should work and it is quite simple (create new formula column with it):

If(Ends With(:Column1, "PF"),
	"prefermentor",
Ends With(:Column1, "F"),
	"fermentor"
,
	""
);
-Jarmo
chandankishor66
Level III

Re: Find few letter and replace whole word

Thanks Jthi