XOR Function in Excel: Exactly One Condition True

XOR Function in Excel: Exactly One Condition True featured illustration

📎 This article includes 1 downloadable practice file ↓

⏱ 2 min readUpdated 28 September 2026

LogicalLevel: IntermediateAvailable in: Excel 2013+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. XOR in practice
  5. Where you will use it
  6. Worked example
  7. Mistakes people make
  8. Related functions
  9. Continue learning

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

Advertisement

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.

XOR in practice

Where you will use it

  • Exactly one of two conditions true
  • Toggle logic
  • Find mismatches between two checks

Worked example

Paid onlinePaid cashFormulaResult
TRUEFALSE=XOR(A2,B2)TRUE
TRUETRUE=XOR(A3,B3)FALSE
FALSEFALSE=XOR(A4,B4)FALSE

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
Many inputsXOR is TRUE when an odd number are TRUE
Expecting ORBoth TRUE gives FALSE

AND · OR · NOT

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

⚡ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

📎 Practice files for this article

  • 📗
    Practice workbook: Logic, LET & LAMBDA17 tasks on realistic sales data — type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX · 35 KB

Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.

✨ Ask AI about this article

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

Free · AI can be wrong