## Excel XOR function

In Excel, the XOR function returns the exclusive Or logical operation for one or more supplied conditions. It will return TRUE if either statement is TRUE, but return FALSE if both statements are TRUE. If neither is TRUE, XOR also returns FALSE.

#### Syntax:

The syntax for the XOR function in Excel is:

=XOR (logical1, [logical2], ...)

#### Arguments:

• Logical1: Required. 1 to 254 conditions you want to test that can be either TRUE or FALSE, it can be logical values, arrays, or references.
• Logical2: Optional. The second condition or logical value to evaluate to TRUE or FALSE.
 Formula Result Description =XOR(1>0,2<1) TRUE Returns TRUE because one argument is true, another argument is false. =XOR(1<0,2<1) FALSE Returns FALSE because both arguments are false. =XOR(1>0,2>1) FALSE Returns FALSE because both arguments are true.

Notes:

• 1. Logical arguments must evaluate to TRUE or FALSE, 1 or 0, or references that contain logical values.
• 2. If contains text or empty cells, those values are ignored.
• 3. XOR returns #VALUE! error value if no logical values are found.
• 4. XOR is applied in Excel 2013 and later versions.
• 5. XOR returns TRUE when the number of supplied conditions evaluate to true is odd, and returns FALSE when the number of supplied conditions evaluate to true is even, or all conditions are FALSE.

#### Return:

Perform exclusive OR, and return TRUE or FALSE.

#### Usage:

Let’s take an example for understanding the usage of this XOR function. Supposing, here is a report of the game competition for the players, which contains the results of first two rounds, now, I want to know which of the players should play the third round based on the following conditions:

• Players who won both round 1 and round 2 need not play round 3, and reach the final directly.
• Players who lost both round 1 and round 2 have not eligible for the third round.
• Players who won either round 1 or round 2 should play round 3 to determine who can reach the final.

Please apply the below formula, then copy the formula to the cells you need, and you will get the result as following screenshot shown:

=XOR(B2="Won", C2="Won")

Tips: This XOR function also can be nested into the IF function, you will get a custom result as you need:

=IF(XOR(B2="Won", C2="Won"), "Yes", "No")

### The Best Office Productivity Tools

#### Kutools for Excel - Helps You To Stand Out From Crowd

 🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions… Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ... Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup... Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List... Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Columns to Select Same & Different Cells ... Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ... Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

#### Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

• One second to switch between dozens of open documents!
• Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
• Increases your productivity by 50% when viewing and editing multiple documents.
• Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.