Excel XOR Function
Excel XOR Function
Dark code
Menu Bootcamps Spaces Sign Up Log in
XOR Function
The XOR function is a premade function in Excel, which returns TRUE or FALSE
based on two or more conditions.
Note: The XOR function is often used together with the IF function.
It is typed =XOR :
For two conditions, you can think of the XOR function as: "either this or that, but
not both"
Dark mode
https://www.w3schools.com/excel/excel_xor.php k d 1/11
8/24/23, 5:11 PM Excel XOR Function
Dark ,code
Note: The different parts of the function are separated by a symbol, like comma
Menu
or semicolon ;
Bootcamps Spaces Sign Up Log in
L The
CSSsymbol
JAVASCRIPT
depends on SQL PYTHON Settings.
your Language JAVA PHP HOW TO W3.CSS
C C+
Copy Values
Dark mode
https://www.w3schools.com/excel/excel_xor.php k d 2/11
8/24/23, 5:11 PM Excel XOR Function
Dark code
Menu Bootcamps Spaces Sign Up Log in
Note: You can add more conditions by repeating steps 5-6 before hitting enter.
The XOR function returns "TRUE" if an odd number (1,3,5,..) of conditions are TRUE.
Since the value in cell B2 is not "Fire" the first condition is FALSE.
Since the value in cell C2 is less than 60 the second condition is also FALSE.
For two conditions, only one condition should to be TRUE for the XOR function to
return TRUE.
Dark mode
https://www.w3schools.com/excel/excel_xor.php k d 3/11
8/24/23, 5:11 PM Excel XOR Function
Dark code
Menu Bootcamps
Note: Text values needs to be in quotes: " "
Spaces Sign Up Log in
The function can be repeated with the filling function for each row to perform the
same check for each Pokemon:
Now, each row has a check for Fire Type or HP less than 60, but not both:
For example:
Ivysaur is not Fire type, but it also does not have less than 60 defense, so the
function returns "FALSE".
Charmeleon is Fire type, and has less than 60 defense, so the function returns
"FALSE" Dark mode
https://www.w3schools.com/excel/excel_xor.php k d 4/11
8/24/23, 5:11 PM Excel XOR Function
Wartortle is not Fire type, but has less than 60 defense, so the functionDark code
returns
Menu
"TRUE" Bootcamps Spaces Sign Up Log in
1. Select cell C2
2. Type =IF
3. Double click the IF command
4. Type XOR
5. Double click the XOR command
Dark mode
https://www.w3schools.com/excel/excel_xor.php k d 5/11
8/24/23, 5:11 PM Excel XOR Function
Dark code
Menu Bootcamps Spaces Sign Up Log in
The function can be repeated with the filling function for each row to perform the
same check for each Pokemon:
Dark mode
https://www.w3schools.com/excel/excel_xor.php k d 6/11
8/24/23, 5:11 PM Excel XOR Function
Dark code
Menu Bootcamps Spaces Sign Up Log in
Now, each row has a check for Water Type or Defense greater than 60, but not
both:
For example:
Ivysaur is not Fire type, but it also does not have less than 60 defense, so the
function returns "No".
Charmeleon is Fire type, and has less than 60 defense, so the function returns
"No"
Wartortle is not Fire type, but has less than 60 defense, so the function returns
"Yes"
❮ Previous Next ❯
Dark mode
https://www.w3schools.com/excel/excel_xor.php k d 7/11
8/24/23, 5:11 PM Excel XOR Function
Dark code
Menu Bootcamps Spaces Sign Up Log in
COLOR PICKER
Dark mode
https://www.w3schools.com/excel/excel_xor.php k d 8/11
8/24/23, 5:11 PM Excel XOR Function
Dark code
Menu Bootcamps Spaces Sign Up Log in
Spaces
Upgrade
Newsletter
Get Certified
Report Error
How To Tutorial
L CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS
C C+
SQL Tutorial
Python Tutorial
W3.CSS Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial
Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
W3.CSS Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
Angular Reference
jQuery Reference
Top Examples
HTML Examples
CSS Examples
JavaScript Examples
How To Examples
SQL Examples
Python Examples
W3.CSS Examples
Bootstrap Examples
PHP Examples
Java Examples
XML Examples
jQuery Examples
Get Certified
HTML Certificate
CSS Certificate
JavaScript Certificate
Front End Certificate
SQL Certificate
Python Certificate
PHP Certificate
jQuery Certificate
Java Certificate
C++ Certificate
C# Certificate
XML Certificate
Dark mode
https://www.w3schools.com/excel/excel_xor.php k d 10/11
8/24/23, 5:11 PM Excel XOR Function
Dark
FORUM code
| ABOUT
https://www.w3schools.com/excel/excel_xor.php 11/11