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.
The syntax for the XOR function in Excel is:
=XOR (logical1, [logical2], ...)
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.
Returns TRUE because one argument is true, another argument is false.
Returns FALSE because both arguments are false.
Returns FALSE because both arguments are true.
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.
Perform exclusive OR, and return TRUE or FALSE.
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:
Tips: This XOR function also can be nested into the IF function, you will get a custom result as you need:
Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.
Designed for 1500 work scenarios, helps you solve 80% Excel problems.
Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
please can you help me how to write a formula with multiple or each one have different conditions like the example bellow but the problem with it it takes only the first if or condition then the second one didn't take it gives me false if I write the A= "FUN-021"