Exactly one passes
| A | B | |
|---|---|---|
| 1 | A | B |
| 2 | 8 | 3 |
Formula: D2: =XOR(A2>5,B2>5)
Result: TRUE
Only the first comparison is true.
XOR with worked examples you can test in the live grid. The argument details are in the Excel guide.
The arguments and common errors are covered in the XOR Excel guide; check the function help in Google Sheets for its own argument list.
| A | B | |
|---|---|---|
| 1 | A | B |
| 2 | 8 | 3 |
Formula: D2: =XOR(A2>5,B2>5)
Result: TRUE
Only the first comparison is true.
| A | B | |
|---|---|---|
| 1 | A | B |
| 2 | 8 | 9 |
Formula: D2: =XOR(A2>5,B2>5)
Result: FALSE
Two true conditions form an even count.
| A | B | C | |
|---|---|---|---|
| 1 | A | B | C |
| 2 | 1 | 1 | 1 |
Formula: E2: =XOR(A2=1,B2=1,C2=1)
Result: TRUE
With three arguments, XOR tests odd parity rather than exactly one.
A tiny spreadsheet with example data. Edit the formula or any number and see the result.
Formula in F2: =XOR(B2>=90,C2="Yes")
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Student | Score | Extra credit | Attempts | Result | |
| 2 | Ann | 92 | Yes | 2 | FALSE | |
| 3 | Bob | 74 | No | 0 | ||
| 4 | Cy | 58 | Yes | 3 | ||
| 5 | Dee | 81 | No | 1 | ||
| 6 | Eli | 66 | 2 |
Google Sheets is used here only as a descriptive product name. FormulaCamp is not affiliated with Google.
Enter — commit · F2 — edit · F4 — $ in a reference · Ctrl+C/Ctrl+V — copy and paste · Ctrl+Z — undo
Esc or F6 — leave the sheet for the «Check» button · Shift+Tab in the first cell — back to the page