T O P I C R E V I E W |
Breadfan |
Posted - 03/25/2013 : 04:28:46 AM fowolling problem
i have a column col(a) with two values, x and y (x, y is text) in another column col(b) i want defined nummers for x and y in the same row like x and y are in col(a)
in other words if col(a)=mom --> col(b)=2 if col(a)=dad --> col(b)=1
with mom=2, dad=1
col(a) mom dad mom mom
col(b) 2 1 2 2
i hope u guess what i mean xD |
2 L A T E S T R E P L I E S (Newest First) |
Breadfan |
Posted - 03/26/2013 : 06:27:09 AM Thank you, thats exactly what i was looking for =) |
matthew@originlab.com |
Posted - 03/25/2013 : 10:46:32 AM Hi,
One way to do this would be to use the Set Column Values dialog, which can be accessed by highlighting the column you want to fill with numbers, and pressing CTRL + Q
Then you can insert a formula into the text box. The following formula would work for your example:
col(a) == "mom" ? 1 : (col(a) == "dad" ? 2 : 0)
Here it will search for the text mom in col(a); if it finds "mom" it will return the value 1, if not it will then search for the text dad in col(a), if it finds the text, it will return the value 2, if not it will return the value 0.
Hope this works for you.
Matthew OriginLab |
|
|