Skip to main content

Logical functions

NameDescriptionSyntax
IFReturns the second argument if a condition is met, and the third one otherwiseIF(logical_test, value_if_true, [value_if_false])
IFERRORReturns the validated value if it does not contain an error, otherwise returns the second argumentIFERROR(value_to_validate, value_if_error)
IFNAReturns the value of the second argument if the first one contains the #N/A error. Otherwise the value of the first argument is returnedIFNA(value, value_if_na)
ANDReturns TRUE if all given conditions are met, and FALSE if at least one condition is not satisfiedAND(logical_test1, [logical_test2, ...])
ORReturns TRUE if at least one given condition is met, and FALSE if none of the conditions are satisfiedOR(logical_test1, [logical_test2, ...])
TRUEReturns the logical value TRUETRUE()
FALSEReturns the logical value FALSEFALSE()
SWITCHCompares an expression with a list of possible values and returns the corresponding result when there is a matchSWITCH(expression, value1, result1, [value2, result2, ...], [default])