Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Hi MetaLearner,
Welcome to the Forum.
The MS Users Manual and the free Equis Formula Primer are the best places to start learning about the MS forumla language. You will find in there details instructions and exercises on how to assign values to variables and how to use the If() function.
Your description uses A and B (twice) so in sticking with the problem description, it goes something like this:
B:=A=TRUE; B:=If(B,2,B);
Which is the same as:
B:=2*(A=TRUE);
If you meant something more along the lines of, "If condition A is true then variable X is equal to 1, otherwise, if condition B is true then variable X is equal to 2" this would be written using nested If()s
X:=If(A,1,If(B,2,0));
Almost anything is possible, but you have to be particulalry explicit when you are defining "anything".
You will find you get better support in having questions answered if you ask specific questions and use specific examples instead of (stealthy, I don't want people to know what I am up to, vague) scenarios using As and Bs.
Hope this helps.
wabbit [:D]
|