Ravindra BagaleCourses & study guides Track your progress

Excel XOR Function

Chala mitrano — today XOR. Logical glue for IF tests — learn the truth table once.

Fictional sample data for learning. Alert rules in Mumbai fintech and Paris retail. Mixed ₹ and €.

Purpose

TRUE if an odd number of tests are TRUE (exclusive patterns).

Return value

TRUE or FALSE.

Syntax

XOR(logical1, [logical2], …)

Arguments

ArgumentRequired?Description
logical1RequiredFirst test.
logical2,…OptionalMore tests; TRUE if odd count of TRUE.

Version

Excel 2013+ for XOR; AND/OR/NOT all classic Excel. LibreOffice supports these.

How to use — Why → What → How

Why: XOR keeps multi-condition business rules readable inside IF/IFS. Alert rules in Mumbai fintech and Paris retail. Mixed ₹ and €. In Indian back offices and foreign sister teams, XOR shows up on approval, SLA and fee sheets every week.

What: XOR returns TRUE/FALSE from its tests. Read the examples as a tiny truth table. Read every argument in the table once before you type; each one changes the answer on purpose.

How — numbered steps:

  1. Type a small =XOR(…) demo.
  2. Wrap with IF for labels.
  3. Fill down on real flags.

Ravindra Bagale's Tip

Friends, after XOR, find one IF/logic cell in a real workbook this week that this lesson improves.

Ravindra Bagale's Tip

Friends, sleep on XOR; rebuild example 1 tomorrow without looking.

Ravindra Bagale's Tip

Friends, say the business rule in plain words before =XOR.

Ravindra Bagale's Tip

Friends, after you finish XOR, open yesterday’s real workbook and find one place this function would have saved ten minutes.

Ravindra Bagale's Tip

Friends, treat XOR like a seatbelt on logic columns — use it before a manager asks why the flag is wrong.

Download practice file: practice-xor.xlsx (includes sheet About this data, practice sheets, and Answers).

Worked examples

1) Exactly one

Two flags.

EmailSMS
TRUEFALSE
Formula: =XOR(A2="TRUE",B2="TRUE")

Result: TRUE

What it means: One TRUE → TRUE.

2) Both true

Not exclusive.

EmailSMS
TRUETRUE
Formula: =XOR(A2="TRUE",B2="TRUE")

Result: FALSE

What it means: Even count of TRUE → FALSE.

3) Neither

Quiet.

EmailSMS
FALSEFALSE
Formula: =XOR(A2="TRUE",B2="TRUE")

Result: FALSE

What it means: Zero TRUEs.

4) IF wrap

Mumbai alerts ₹.

EmailSMS₹
TRUEFALSE10
Formula: =IF(XOR(A2="TRUE",B2="TRUE"),"One channel","Check")

Result: One channel

What it means: Business rule: exactly one.

5) Three args

Two TRUE.

ABC
TRUEFALSETRUE
Formula: =XOR(A2="TRUE",B2="TRUE",C2="TRUE")

Result: FALSE

What it means: Two TRUEs → even → FALSE.

6) Paris €

Toggle.

OnlineStore
FALSETRUE
Formula: =XOR(A2="TRUE",B2="TRUE")

Result: TRUE

What it means: Exclusive channel.

Common errors and fixes

#VALUE! — Bad inputs. Fix: Use TRUE/FALSE tests.
Unexpected FALSE — Spaces/case. Fix: TRIM/UPPER.
Confused with OR/AND — Wrong combiner. Fix: Redraw the truth table.

Notes and tips

  • Revisit XOR errors after the quiz.
  • Build one example from memory.
  • Check types if results look wrong.
  • Teach a tip in Marathi or Hindi.
  • Keep currency consistent in one column (practice mixes ₹ $ £ €).
  • Drill: exactly-one channel flag with XOR.
  • XOR vs OR: exclusive/odd vs any.
  • Fictional sample data only.
  • Print the XOR revision card.
  • Ask juniors to predict before Enter.
  • Track your top mistake monthly.
  • Alert rules in Mumbai fintech and Paris retail. Mixed ₹ and €.
  • Logical tests love TRIM and UPPER when text is messy.
  • Interview tip: explain the business rule before the formula.
  • When nesting, keep each IF on its own mental line — or switch to IFS/SWITCH.
  • Classroom drill: invent three brand-new formulas from your city without the page open.
  • Share one tip with a classmate — teaching locks the idea.
  • If a result looks wrong, check blanks vs zeros before rewriting logic.
  • Print the revision card for XOR for one week of real worksheets.
  • When helping a junior, ask them to predict before Enter.
  • Share one tip with a classmate in Marathi or Hindi.
  • Keep currency symbols consistent inside a single report column.
  • When Excel versions differ, write a nested-IF fallback under IFS/SWITCH in a comment.
  • Logical tests love TRIM and UPPER when text is messy.
  • Interview tip: explain the business rule before the formula.

In real work

Drill: exactly-one channel flag with XOR. Alert rules in Mumbai fintech and Paris retail. Mixed ₹ and €. Classroom drill: write three brand-new XOR formulas on a blank sheet using names from your own city — if you can invent them without the page open, you own the skill. Then break one formula on purpose and watch the error; recovering from that break is half of interview readiness. Always verify with a known case before trusting a long chain of logical tests. Keep a personal notebook of the one mistake you make most often with this function; review it monthly.

How it compares

XOR vs OR: exclusive/odd vs any.

Interview corner

When use?
Multi-condition IF.
TRUE/FALSE meaning?
TRUE if an odd number of tests are TRUE (exclusive patterns).
Common bug?
Spaces/case.

IF, AND, OR, NOT, XOR

Practice tasks (10)

  1. Task 1. Demo XOR on two flags.
    Basic.
  2. Task 2. Wrap with IF labels.
    IF.
  3. Task 3. Show a FALSE case.
    Fail.
  4. Task 4. TRIM text inputs.
    Clean.
  5. Task 5. Explain vs the sibling combiner.
    Interview.
  6. Task 6. Fill down.
    Fill.
  7. Task 7. Doc the business rule.
    Note.
  8. Task 8. Teach classmate.
    Teach.
  9. Task 9. Three-argument demo if supported.
    Multi.
  10. Task 10. Bonus: nest with IF.
    Nest.

Quick quiz

Q1. XOR returns:
Q2. Often wrapped in:
Q3. Blank vs text risk:
Q4. Truth table:
Q5. Compare AND/OR/XOR:

Answers: Q1=TRUE/FALSE, Q2=IF, Q3=Silent FALSE, Q4=Essential, Q5=Different rules (check after you try).

Revision card

Standalone card (no tip or photo strip). QR opens this lesson. Download the PNG and revise offline.

Revision card: XOR
XOR revision card