XOR Function

The XOR function is one of the logical functions. It is used to return a logical Exclusive Or of all arguments. The function returns TRUE when the number of TRUE inputs is odd and FALSE when the number of TRUE inputs is even.

Syntax

XOR(logical1, [logical2], ...)

The XOR function has the following arguments:

ArgumentDescription
logical1/2/nA condition that you want to check if it is TRUE or FALSE
Notes

You can enter up to 255 logical values.

How to apply the XOR function.

Examples

There are two arguments: logical1 = 1>0, logical2 = 2>0. The number of TRUE inputs is even, so the function returns FALSE.

XOR Function: FALSE

There are two arguments: logical1 = 1>0, logical2 = 2<0. The number of TRUE inputs is odd, so the function returns TRUE.

XOR Function: TRUE

Host ONLYOFFICE Docs on your own server or use it in the cloud

Article with the tag:
Browse all tags