1. Home
  2. Functions
  3. Logical
  4. XOR

XOR function

TRUE when an odd number of arguments are TRUE.

Syntax

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

Arguments

ArgumentRequiredDescription
logical1RequiredA condition, value or range
logical2OptionalMore conditions

How to use XOR

XOR takes 1 required argument and 1 optional argument, and accepts more values in the same pattern. Type =XOR( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=XOR(TRUE, FALSE)Result TRUE
=XOR(TRUE, TRUE)Result FALSE

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.