The XOR function performs an exclusive or of 2 numbers that returns a 1 if the numbers are different, and a 0 otherwise. Learn more.
The XOR function in Google Sheets is a logical function that stands for "exclusive or". It returns a logical value of TRUE if only one of the provided arguments or expressions is TRUE, and FALSE if none or more than one of the expressions are TRUE.
The syntax for the XOR function in Google Sheets is as follows: =XOR(logicalexpression1, [logicalexpression2, …])
Here, logicalexpression1 is required, while logicalexpression2, logical_expression3, and so on are optional arguments that you can include up to 253 times.
For example, the following formula would return TRUE because only one of the arguments is TRUE:
=XOR(TRUE, FALSE, FALSE)
The formula would return FALSE because all of the arguments are TRUE:
=XOR(TRUE, TRUE, TRUE)
And the formula would also return FALSE because none of the arguments are TRUE:
=XOR(FALSE, FALSE, FALSE)