ExcelExcel 2013+
XOR function in Excel
Returns a logical exclusive OR of all arguments
=XOR(logical1, [logical2], …)XOR syntax and parameters
Two arguments, one required.
- logical1booleanRequired
- logical2booleanRepeating
XOR examples
Formulas you'll actually reuse.
TRUE when exactly one of two checks passes — not both, not neither:
=XOR(B2 = C2, D2 = E2)Result
TRUEExactly one of two sign-off columns should say Yes:
=IF(XOR(F2 = "Yes", G2 = "Yes"), "One approver", "Check")Result
"One approver"
XOR in Google Sheets
Same name — your formula ports as-is.
Try XOR in the playground
Edit the example — nothing to install.
Preloaded with the XOR formula from Example 1 — change anything and watch it respond.
Loading the editor…
Related functions
More ways Excel gets this done.
- ANDReturns TRUE if all of its arguments are TRUELogicalGoogle Sheets
- BYCOLApplies a LAMBDA to each column and returns an array of the resultsLogicalGoogle Sheets
- BYROWApplies a LAMBDA to each row and returns an array of the resultsLogicalGoogle Sheets
- FALSEReturns the logical value FALSELogicalGoogle Sheets
- IFSpecifies a logical test to performLogicalGoogle Sheets
- IFERRORReturns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formulaLogicalGoogle Sheets