# XOR

Formulas / XOR
Perform exclusive OR.
`=XOR(logical1,[logical2])`
• logical1 - required argument
• logical2 - [OPTIONAL] argument
• subsequent logical values - [OPTIONAL] arguments

## Examples

• `=XOR(B5,C5)`

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.

• `=XOR(B5,C5)`

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.

• `=XOR(B5,C5,D5)`

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.

• `=XOR(B5:D5,E5:G5)`

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.

## Summary

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.