Skip to content
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.

  1. TRUE when exactly one of two checks passes — not both, not neither:

    =XOR(B2 = C2, D2 = E2)

    ResultTRUE

  2. Exactly 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…