XOR

Returns TRUE is only one of the two received values is true. This is known as “Exclusive OR”. If both values are true, this returns FALSE.

Note that those values can be variables or the result of functions and operators.

Usage

XOR(value1, value2...)

Parameters

value1

(Required) The first TRUE or FALSE value

value2

The second TRUE or FALSE value

...

You can give as many values as you want

Examples

Example With these variables Result

XOR(country = “Canada”, age >= 18)

age is 22
country is "Canada"

FALSE

XOR(country = “Canada”, age >= 18)

age is 10
country is "Canada"

TRUE

XOR(country = “Canada”, age >= 18)

age is 22
country is "Belgium"

TRUE

XOR(country = “Canada”, age >= 18)

age is 10
country is "Belgium"

FALSE

XOR(country = “Canada”, age >= 18, ISNUMBER(FIND(“g”, name)))

age is 10
country is "Belgium"
name is "Analog"

TRUE

IF(XOR(country = “Canada”, age >= 18), “verified”, “not verified”)

age is 10
country is "Canada"

“verified”

More information

The function can receive more than 2 values. The result will be TRUE if the number of TRUE in the values is odd, and FALSE otherwise.

This is a rare need, so it’s likely you will never need this. But if you do, it’s nice to have it.

See also