The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 is it possible to compare data?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Breadfan

14 Posts

Posted - 03/25/2013 :  04:28:46 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Edited by - Breadfan on 03/25/2013 08:32:50 AM

matthew@originlab.com

73 Posts

Posted - 03/25/2013 :  10:46:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Breadfan

14 Posts

Posted - 03/26/2013 :  06:27:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you,
thats exactly what i was looking for =)
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000