# How to check if exactly one of two conditions is true in Excel

Use XOR, which is TRUE when one test is true but not both: =IF(XOR(B2="Approve",C2="Approve"),"Third review","Decided").

**Excel:** `=IF(XOR(B2="Approve",C2="Approve"),"Third review","Decided")` (Excel 2013 and later)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D |
| --- | --- | --- | --- |
| Application | Reviewer 1 | Reviewer 2 | Next step |
| APP-11 | Approve | Approve |  |
| APP-12 | Approve | Reject |  |
| APP-13 | Reject | Reject |  |
| APP-14 | Reject | Approve |  |
| APP-15 | Approve | Approve |  |
| APP-16 | Reject | Approve |  |

Formula in D2, filled to D7: `=IF(XOR(B2="Approve",C2="Approve"),"Third review","Decided")`

Result: Decided; Third review; Decided; Third review; Decided; Third review

## How it works

XOR (exclusive or) returns TRUE when exactly one of two tests is TRUE, and FALSE when both are TRUE or both are FALSE. Here that singles out the split decisions. OR would also flag the rows where both reviewers approved.

## Other ways

- `=IF(B2<>C2,"Third review","Decided")`: With two reviewers and two possible answers, "they disagree" is the same test. XOR is clearer when the two conditions are different questions.
- `=IF((B2="Approve")+(C2="Approve")=1,"Third review","Decided")`: Adding the tests counts how many are TRUE. "=1" means exactly one, and it extends to three or more conditions.

## Common mistakes

- With more than two conditions, XOR is TRUE when an odd number are TRUE (1 or 3), not "exactly one". Count the TRUEs instead.
- XOR needs Excel 2013 or later. In older versions use the not-equal or counting version.

## Questions

**How do I check that exactly one of three cells says Yes?**

Count them: `=COUNTIF(B2:D2,"Yes")=1`.

**Does Google Sheets have XOR?**

Yes, with the same behavior.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/xor-only-one-condition-true
