XOR Function in Excel: Exactly One Condition True

⏱ 1 min readUpdated 28 September 2026

LogicalLevel: IntermediateAvailable in: Excel 2013+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Related functions

XOR returns TRUE when an odd number of conditions are TRUE — with two conditions, “one or the other but not both”.

Syntax

=XOR(logical1, [logical2], ...)
Argument What it means
logical1… Conditions.

Examples

Example 1

=XOR(C2="Paid", D2<>"")

Flag inconsistent rows: marked Paid but no payment date, or a date but not marked Paid.

AND · OR · NOT

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong