Perform exclusive OR.
- logical1 - required argument
- logical2 - [OPTIONAL] argument
- subsequent logical values - [OPTIONAL] arguments
The XOR function is used to compare two values and return a boolean value. For example, this will return TRUE if B5 and C5 have the same value, and FALSE if they are different.
The XOR function can be used to compare two cells containing different types of data. For example, if B5 contains text and C5 contains a number, this will return FALSE if both values are the same, regardless of their data type.
The XOR function can also be used to compare more than two values. For example, this will return TRUE only if all three values are the same.
The XOR function can be used to compare two ranges of cells. For example, this formula will return TRUE if all of the cells in both ranges have the same values.
The XOR function is a logical operation which returns a true or false result based on the evaluation of given Boolean values. It can be used with arrays or references and ignores any text or empty cells in its arguments.
- XOR returns TRUE if either logical is TRUE and FALSE if both logicals are TRUE or neither logical is TRUE.
Frequently Asked Questions
What is the XOR function?
The XOR function (short for Exclusive OR) returns a logical value based on the arguments it is given. It evaluates the truth of a statement by comparing two or more logical values and returning a true or false value.
What types of values can be passed to the XOR function?
The XOR function takes arguments that are valid logical values. This can be arrays or references containing logical values.
What does the XOR function ignore?
The XOR function ignores any text and empty cells in arguments.
What can the XOR function be used for?
The XOR function can be used to test if a value occurs in an array. It can also be used to evaluate a statement with multiple logical values.