cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar

Converting a number in one column to a word in another column

Hi all, 

 

This is probably covered elsewhere but I couldn't find it. I'd like to make a formula that will give a specific word for a given value in a separate column. See below:

ColumnValueWord
13

Orange

23Orange
34Red
45Green

Any tips on how I can accomplish this?

 

Thanks!

 

KH

1 ACCEPTED SOLUTION

Accepted Solutions
KarenC
Super User (Alumni)

Re: Converting a number in one column to a word in another column

Another option is to use recode with the formula column option (drop down in upper left of dialog), click ok when asked if you want to convert to character (JMP converts the new column to character).  The result is as provided by Jim but with JMP doing the formula writing.

 

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Converting a number in one column to a word in another column

This can be done with an IF() statement structure or with a Match() function or other.  I prefer

Match(:Value, 1,"Red", 2,"Orange",2,"Green"...........) 

Jim
KarenC
Super User (Alumni)

Re: Converting a number in one column to a word in another column

Another option is to use recode with the formula column option (drop down in upper left of dialog), click ok when asked if you want to convert to character (JMP converts the new column to character).  The result is as provided by Jim but with JMP doing the formula writing.

 

Re: Converting a number in one column to a word in another column


@KarenC wrote:

Another option is to use recode with the formula column option (drop down in upper left of dialog), click ok when asked if you want to convert to character (JMP converts the new column to character).  The result is as provided by Jim but with JMP doing the formula writing.

 



Thanks Karen!

I thought there was a way to do it like this. I was struggling with the match formula. 

KH