Choose Language Hide Translation Bar
Highlighted

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
Highlighted
KarenC
Super User

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
Highlighted
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
Highlighted
KarenC
Super User

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

Highlighted

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

Article Labels

    There are no labels assigned to this post.