Originally Posted by
stelthorst
I have a property set (Let's call it PS3) that combines two other property sets (PS1 and PS2).
Currently 'None' is an option in both PS1 and PS2. If both property sets have none selected my PS3 now says "None None". What I want to do is look at PS1 and PS2 and if either one of them say 'None' then make PS3 = 'None. My problem is I don't know the code very well. What I want is something like:
If PS1 = "None"
Then RESULT = "None"
ElseIf PS2 = "None"
Then RESULT = "None"
RESULT = PS1 PS2
Please excuse my ignorance on this issue but I'm not sure how to write the formula to achieve the desired results
Thanks in advance for all of your help,
Try this:
Code:
If "[PS1]" = "None" or "[PS2]" = "None" Then
RESULT = "None"
Else
RESULT = "[PS1]" & "[PS2]"
End If
Or, if you prefer, this:
Code:
If "[PS1]" = "None" Then
RESULT = "None"
Elseif "[PS2]" = "None" Then
RESULT = "None"
Else
RESULT = "[PS1]" & "[PS2]"
End If
More on the syntax of the If statement can be found in this blog article, if you are interested. I did not test any of the above myself, but I think I got the statements right. Post back if there are problems. I also assumed that if the PS1 and PS2 properties are both not "None" that you want to concatenate the values. If that is not the case, you will need to revise the Else statement's RESULT line.