XOR

  • Updated

Returns TRUE if an odd number of arguments are TRUE. Returns FALSE otherwise.

Sample Usage

XOR(TRUE,FALSE)
XOR(C5,C6)
XOR(A2>1, A2<100)

Syntax

XOR(logical_expression1, logical_expression2)

  • logical_expression1 - An expression or reference to a cell containing an expression that represents some logical value. Each expression must be either TRUE or FALSE.
  • logical_expression2 - [OPTIONAL] An expression or reference to a cell containing an expression that represents some logical value. Each expression must be either TRUE or FALSE.

Examples

XOR(TRUE,TRUE) returns a value of FALSE.
XOR(TRUE,FALSE) returns a value of TRUE.
XOR(FALSE,FALSE) returns a value of FALSE.
XOR(A2>1, A2<100) returns TRUE if any one condition is true and returns FALSE otherwise.

 Notes

  • The number 0 is logically false; all other numbers (including negative numbers) are logically true.