Logical Functions
Function | Description | Syntax |
---|---|---|
If | Returns a value based on the testing of multiple logical values. If Test evaluates to True, the value returned is that of the second parameter (the “Then” expression). If Test is a numeric expression, then any value other than zero is considered to be True. If Test is a string expression, any value other than the null string is considered to be True. If Test evaluates to False, the value returned is that of the third parameter (the “Else” expression). | If(Test,Then,Else) |
IsEmpty | Returns true if String = "", else false. | IsEmpty(String) |
IsNum | Returns true if Value is numeric; returns false if non numeric. | IsNum(String) |
Select | Returns a value based on an integer index. If CaseNum is 0, the value of Case0 is returned; if CaseNum is 1, the value of Case1 is returned, and so on. If CaseNum is out of bounds, the value of Default is returned. | Select(CaseNum,Default,Case0) |
Switch | Returns a value based on multiple logical comparisons. If SwitchValue is equal to Value1, the value of Result1 is returned, else if SwitchValue is equal to Value2, the value of Result2 is returned, and so on. If none of the Values are equal to SwitchValue, the value of Default is returned. | Switch(SwitchValue,Default,Value1,Result1) Switch(SwitchValue,Default,Value1,Result1…ValueN,ResultN) |