FormulaCamp
Completed
← Google Sheets functions
Google Sheets function

XOR in Google Sheets

XOR with worked examples you can test in the live grid. The argument details are in the Excel guide.

In Google Sheets

The arguments and common errors are covered in the XOR Excel guide; check the function help in Google Sheets for its own argument list.

Worked examples in Google Sheets

Exactly one passes

AB
1AB
283

Formula: D2: =XOR(A2>5,B2>5)

Result: TRUE

Only the first comparison is true.

Both pass

AB
1AB
289

Formula: D2: =XOR(A2>5,B2>5)

Result: FALSE

Two true conditions form an even count.

Three true conditions

ABC
1ABC
2111

Formula: E2: =XOR(A2=1,B2=1,C2=1)

Result: TRUE

With three arguments, XOR tests odd parity rather than exactly one.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in F2: =XOR(B2>=90,C2="Yes")

Example spreadsheet for XOR
ABCDEF
1StudentScoreExtra creditAttemptsResult
2Ann92Yes2FALSE
3Bob74No0
4Cy58Yes3
5Dee81No1
6Eli662
Result in F2: FALSE
Practice this in a lesson: SWITCH, XOR, IFNA, EXACT

Google Sheets is used here only as a descriptive product name. FormulaCamp is not affiliated with Google.