# Excel XOR function

## Summary

The Excel XOR function, known as “exclusive OR,” is a logical function that evaluates multiple conditions and returns TRUE if an odd number of conditions are true. Specifically, with two logical statements, XOR returns TRUE if exactly one statement is TRUE, and FALSE if both are TRUE or both are FALSE.
##### Syntax
```				```
=XOR(logical1, [logical2], ...)
```
```
• logical1: The first condition or logical value to evaluate.
• logical2: [Optional] Additional conditions or logical values to evaluate.
##### Return value
TRUE if an odd number of the arguments evaluate to TRUE; otherwise, FALSE.

## How to use

Use the XOR function when you need to check multiple conditions and want to return TRUE only when an odd number of those conditions are true. This function is particularly useful in scenarios requiring a strict one-condition-only logic or in creating toggles and switches in your data.

## Examples

##### Simple XOR
Single Toggle Activation: To check if only one of two features is activated:
```				```
=XOR(A1=1, B1=1)
```
```
This formula returns TRUE if either A1 or B1 equals 1, indicating a single feature is activated, but not both.
##### XOR and IF
Conditional Response Based on Single Criteria Met: To provide a response only if one specific condition is met out of two:
```				```
=IF(XOR(C1>50, D1<20), "Unique Condition Met", "No Unique Condition Met")
```
```
This formula checks if either C1 is greater than 50 or D1 is less than 20, but not both, to provide a unique response.
##### XOR with Multiple Conditions
Odd-Numbered Activation Check: To determine if an odd number of cells contain the word “Active”:
```				```
=XOR(E1="Active", F1="Active", G1="Active")
```
```
This formula returns TRUE if exactly one or all three cells (E1, F1, G1) contain the word “Active,” indicating an odd number of activations.