I have:
1. a (text) field called “Title”. This contains entries such as “Mr”, “Ms”, “Miss” or “Mrs”.
2. another calculation field called “Gender”, which contains the following:
IF([Title] = “Mr”, “his”, “her”).
The result type is set to text.
Whether I type in “Mr” or “Ms” or “Miss” or “Mrs” the only result that the calculation produces is “his”.
Am I doing something wrong?
The IF(condition
; then
; else
) function only works with a numeric condition
.
You’ll need to use IFEQUAL(A; B; C; D)
instead.
IFEQUAL(A;B;C;D)
will return C if A and B are equal. If A and B are not equal, returns D. A and B must be text.
Brendan,
Thank you for the explanation.
Sorry to nit-pick, but the IFEQUAL function is not in the manual (online or pdf). I suggest for new users it might help to have a line of explanation in the manual that the IF function is not for use where the user wishes to make a text comparison, but they should use IFEQUAL instead.
Oops. Yes you’re right. I’ve just added information to the manual for the IFEQUAL()
function.