XOR Function in MS Excel: Syntax, Arguments & Examples

What is XOR Function in MS Excel?

The XOR function is the acronym for Exclusive OR. This is a premade function in MS Excel. It is used to return a logical value.

Purpose of XOR Function in Excel

The XOR function is under the category of logical functions in MS Excel. It has two logical statements. If any one of the statements is TRUE, then the function will return the value TRUE. If both statements are TRUE then the function will return the value FALSE. If none of the statements is TRUE then the returned value will be FALSE.  

Syntax of XOR Function

The syntax of the XOR function is written below.

=XOR (logical1, [logical2], …)

Arguments

The arguments in the XOR function are described below.

Logical 1: logical 1 is the first argument is XOR function. This is a necessary argument. It is the value that could be an array, a logical value, or a reference.

Logical 2: this is an optional argument. If the first condition does not return the TRUE value then logical 2 is tested.

Examples

=XOR (3>0, 2<9)

Both conditions in this example are TRUE, which is why the returned value will be FALSE.

Scroll to top