XOR Function in Excel: Syntax, Examples & Practice
Learn the Excel XOR function: Returns TRUE when an odd number of arguments are TRUE. Try focused practice and download a free workbook.
Syntax
=XOR(logical1, [logical2], …)
Check the function documentation for your Excel version and platform. The browser simulator implements selected behavior and does not reproduce every Excel feature.
Worked example
| Row | A: Employee | B: Flag A | C: Flag B |
|---|---|---|---|
| 2 | Amit | Yes | No |
| 3 | Priya | No | Yes |
| 4 | Ravi | Yes | Yes |
| 5 | Neha | No | No |
=XOR(B2="Yes",C2="Yes")
Expected result: TRUE
XOR is true when an odd number of conditions is true. Amit has exactly one Yes.
Professional use
Quality checks and mutually exclusive flags.
Practice XOR · Download practice .xlsx
Apply your skills
Explore MIS and finance projects
Questions and answers
How can I practise XOR?
Use the focused ten-question XOR lab, then download its workbook for ten additional function-specific tasks and an answer key. Core learning works without an account.
Which Excel version supports XOR?
Check the function documentation for your Excel version and platform. The browser simulator implements selected behavior and does not reproduce every Excel feature.
Does the browser simulator replace Microsoft Excel?
No. It supports a selected set of formula behavior for practice. Native workbook recalculation, full function compatibility, PivotTables and external data features must be checked in your own Excel installation.
Interactive practice runs in your browser.