Converting a number in one column to a word in another columnHi 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:
| Column | Value | Word |
| 1 | 3 | Orange |
| 2 | 3 | Orange |
| 3 | 4 | Red |
| 4 | 5 | Green |
Any tips on how I can accomplish this?
Thanks!
KH
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
Re: Converting a number in one column to a word in another columnAnother 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 columnThis 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"...........)
r