Share

Logical functions (Boolean)

The following tables provide a list of expressions of logical functions.

ANDDescription
ReturnsTRUE if all its arguments are TRUE.
Syntaxand(number1, number2) Number1 and number2 should be logical values.
EQUALDescription
ReturnsTRUE if its arguments are EQUAL.
Syntaxnumber1 = number2 (number, number) Number1 and number2 are the numbers that you want to test.
GREATERDescription
ReturnsTRUE if the first argument is greater than the second argument.
Syntaxnumber1 >= number2 (number, number)Number1 and number2 are the numbers that you want to test.
GREATER OR EQUALDescription
ReturnsTRUE if the first argument is greater than or equal to the second argument.
Syntaxnumber1 >= number2 (number, number)Number1 and number2 are the numbers that you want to test.
IFDescription
SpecifiesA logical test to perform)
Syntaxif (test, value1, value2)Test is any value or expression that can be evaluated to TRUE or FALSE. Value1 is the value that is returned if test is TRUE.Value2 is the value that is returned if test is FALSE.
IS BETWEENDescription
ChecksChecks if one value is between two others)
Syntaxisbetween
LESSDescription
ReturnsTRUE if the first argument is less than the second argument)
Syntaxnumber1 < number2 (number, number) Number1 and number2 are the numbers that you want to test.
LESS OR EQUALDescription
ReturnsTRUE if the first argument is less than or equal to the second argument.
Syntaxnumber1 <= number2 (number, number)Number1 and number2 are the numbers that you want to test.
NANDDescription
ReturnsFALSE if all its arguments are TRUE.
Syntaxnand(number1, number2)Number1 and number2 should be logical values.
NORDescription
ReturnsFALSE if any argument is TRUE.
Syntaxnor(number1, number2)Number1 and number2 should be logical values.
NOTDescription
PurposeReverses the logic of its argument.
Syntaxnot(number) Number is a value or expression that can be evaluated to TRUE or FALSE. If number is FALSE, NOT returns TRUE. If number is TRUE, NOT returns FALSE.
NOT EQUALDescription
ReturnsTRUE if its arguments are NOT EQUAL.
Syntaxnumber1 <> number 2 (number 1, number 2)Number1 and number2 are the numbers that you want to test.
ORDescription
ReturnsTRUE if any argument is TRUE.
Syntaxor(number1, number2)Number1 and number2 should be logical values.

Was this information helpful?