# 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.

The XOR function syntax is:

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

where logical1 is a value entered manually or included into the cell you make reference to.

To apply the XOR function,

1. select the cell where you wish to display the result,
2. click the Insert function icon situated at the top toolbar,
   or right-click within a selected cell and select the Insert Function option from the menu,
   or click the icon situated at the formula bar,
3. select the Logical function group from the list,
4. click the XOR function,
5. enter the required arguments separating them by commas,

   Note: you can enter up to 254 logical values.

6. press the Enter button.

The result will be displayed in the selected cell.

For example:

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

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