Logical Excel 2013 ◉ 12 views

=XOR()

The XOR function returns a logical Exclusive Or of all arguments.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=XOR(logical1, [logical2],…)
Hover argument names in the table for details.
Output typeLogical
Popularity15 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx — Coming soon ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =XOR() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
📥 Download XOR.xlsx — Coming soon ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

🧠 🧠 Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
logical1 Logical Required , logical2,… Logical 1 is required, subsequent logical values are optional. 1 to 254 conditions you want to test that can be either TRUE or FALSE, and can be logical values, arrays, or references.

▣ Examples

چون هر دو آزمون TRUE می‌شوند، FALSE برگردانده می‌شود =XOR(3>0,2<9)
چون تمام نتایج آزمون FALSE هستند، FALSE برگردانده می‌شود؛ برای برگرداندن TRUE حداقل یکی از نتایج باید TRUE باشد =XOR(3>12,4>6)

✦ Tips

  • The arguments must evaluate to logical values such as TRUE or FALSE, or in arrays or references that contain logical values.
  • If an array or reference argument contains text or empty cells, those values are ignored.
  • You can use an XOR array formula to see if a value occurs in an array. Note If you have a current version of Microsoft 365, then you can simply enter the formula in the top-left-cell of the output range, then press ENTER to confirm the formula as a dynamic array formula. Otherwise, the formula must be entered as a legacy array formula by first selecting the output range, entering the formula in the top-left-cell of the output range, and then pressing CTRL+SHIFT+ENTER to confirm it. Excel inserts curly brackets at the beginning and end of the formula for you. For more information on array formulas, see Guidelines and examples of array formulas.
  • The result of XOR is TRUE when the number of TRUE inputs is odd and FALSE when the number of TRUE inputs is even.

⚠ Common Errors

#VALUE! If the specified range contains no logical values, XOR returns the #VALUE! error value.
Fix: Write the condition as a comparison

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.