# XOR

## Rational

Returns TRUE when only one condition is true.

## Description

The Excel XOR (exclusive OR) function is a logical operator which return TRUE when only one of the logic or condition is true.
Don’t confuse, OR function return TRUE when at least one of the logic is true whereas XOR function returns TRUE if only one is right.

## Syntax

= XOR(logical1, [logical2],…)

## Parameters

logical1 -The first criteria to evaluate
logical2 [optional] – Additional criteria to test, up to a maximum of 255 criteria.

## Return Value

Logical value TRUE or FALSE

## Key Notes

The XOR function returns TRUE if only one criterion (exclusive OR) is true and return FALSE in case more than one or none of the logic is true among all the conditions.
Empty or Blank cell arguments are considered FALSE.

### SWITCH

The Excel SWITCH function lookup value in a list of multiple labels and return the corresponding first match otherwise default clause or #N/A return.

### OR

The OR function is a logical operator that returns TRUE if the condition matches i.e. =OR(A1=10, A1=100) check cell A1 contains either 10 or 100.

### AND

The AND function is a logical operator that join two or more criteria i.e., if A2 is 75, =AND(A2>1,A2<50), return “FALSE” as none of the condition matches.