Computes the logic exclusive Or of all arguments
XOR(logicalOne, [logicalTwo],…)
The first logical value is required. The other logical values are optional. TRUE/FALSE, or arrays/references containing TRUE/FALSE values, are the only acceptable argument evaluations for the logical values.
XOR returns TRUE only when an odd number of its arguments are TRUE, otherwise returns FALSE.
Example:
If the arguments contain 1<4, 2<4 and 3<4:
XOR(1<4, 2<4, 3<4)
returns TRUE
If the arguments contain 1<4, 2<4 and 4<4:
XOR(1<4, 2<4, 4<4)
returns FALSE
logicalOne:
logicalTwo:
logicalThree:
Result:
Identifying Customer Order Discrepancies
Imagine you run an e-commerce business, and you offer free shipping under two distinct conditions:
You want to use the XOR function to quickly identify orders where exactly one of these conditions is met for free shipping, but not both, or neither. This might be useful for auditing, special promotions, or identifying edge cases in your shipping logic.
Scenario: You want to find orders where a customer either received free shipping because they were a premium member or because their order was over $100, but not if they qualified under both conditions.
Here's a table demonstrating this:
Order ID | Customer Name | Premium Member | Order Total | Free Shipping Applied | XOR Condition Met (For Audit) | ||
|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | ||
1 | 1001 | Alice | TRUE | $75.00 | TRUE | TRUE | |
2 | 1002 | Bob | FALSE | $120.00 | TRUE | TRUE | |
3 | 1003 | Carol | TRUE | $150.00 | TRUE | FALSE | |
4 | 1004 | David | FALSE | $50.00 | FALSE | FALSE | |
5 | 1005 | Emily | TRUE | $100.00 | TRUE | FALSE | |
6 | 1006 | Frank | FALSE | $90.00 | FALSE | FALSE | |
7 | 1007 | Grace | TRUE | $95.00 | TRUE | TRUE | |
8 | 1008 | Henry | FALSE | $110.00 | TRUE | TRUE |
Explanation of the XOR Formula:
Let's assume:
In cell F1 (for "XOR Condition Met"), you would enter the following formula:
XOR(C1, D1>=100)
How it works for each row:
PRODUCT & FEATURES
RESOURCES
Terms | Privacy | Spam Policy
© 2026 Zapof