XOR in WPS Spreadsheet: Exclusive OR and Odd-Parity Conditions
Use WPS XOR for two-condition exclusivity and multi-condition odd parity, with full truth tables, toggle models and an exactly-one alternative.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: XOR returns TRUE when an odd number of its logical inputs are true. For two inputs, that means exactly one is true. With three inputs, all three being true also returns TRUE, so XOR is not a general exactly-one test.
Availability and version history
- Introduced: documented by 2019-06-17 in the official WPS lesson; original introduction is not established.
- Availability: WPS Office for Windows Personal; no numeric release is stated in the edition metadata.
- Scope: exact current supported builds remain unverified. The Windows lesson does not establish equivalent availability in other WPS clients.
- Checked: October 14, 2026 against function-specific documentation. Examples were independently calculated; no native WPS test was performed.
Syntax and documented scope
=XOR(logical1, [logical2], ...)
The first condition is required; additional conditions are optional. The dated Windows Personal reference describes 1–254 conditions, not a verified current-build maximum. Arguments may be logical values, arrays or references; referenced text and empty cells are ignored.
Examples use English names and comma separators. Square brackets mark optional arguments and are not typed. Primary controls use explicit TRUE/FALSE values rather than assuming how arbitrary numbers or strings are coerced.
Example 1: inspect all two-condition cases
Enter the following Boolean pairs in A2:B5 using TRUE() and FALSE(), then fill =XOR(A2,B2) down C:
| First input | Second input | Expected XOR |
|---|---|---|
| FALSE | FALSE | FALSE |
| FALSE | TRUE | TRUE |
| TRUE | FALSE | TRUE |
| TRUE | TRUE | FALSE |
Suppose the flags describe two alternative options and exactly one must be selected. The two middle rows satisfy that requirement. OR would also accept the last row; AND would accept only the last row.
This interpretation relies on there being exactly two valid Boolean choices. It does not validate the original form or establish that every imported flag is truly Boolean.
Example 2: inspect three-condition parity
Use three Boolean columns on a separate sheet and apply =XOR(A2:C2) one row at a time:
| A | B | C | Number true | Expected XOR |
|---|---|---|---|---|
| FALSE | FALSE | FALSE | 0 | FALSE |
| FALSE | FALSE | TRUE | 1 | TRUE |
| FALSE | TRUE | FALSE | 1 | TRUE |
| FALSE | TRUE | TRUE | 2 | FALSE |
| TRUE | FALSE | FALSE | 1 | TRUE |
| TRUE | FALSE | TRUE | 2 | FALSE |
| TRUE | TRUE | FALSE | 2 | FALSE |
| TRUE | TRUE | TRUE | 3 | TRUE |
The final row is the important counterexample to “exactly one.” Four rows return TRUE because the true-input count is odd, but only three rows have exactly one true input.
The Number true column is explanatory. The XOR input is only A:C; including a numeric helper count would change the supplied arguments and introduce a different type question.
Advanced example: implement exactly one of three explicitly
For Boolean A2:C2:
=IF(A2,1,0)+IF(B2,1,0)+IF(C2,1,0)=1
On the eight-row table, expected results are FALSE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE and FALSE. The all-TRUE row now fails, as an exactly-one requirement demands.
The explicit IF conversions turn each validated flag into one or zero. This avoids silently assuming that XOR’s odd-parity rule is equivalent to a one-selection policy as more options are added.
Advanced example: model an on/off toggle history
Start with a FALSE state in F2. Put three TRUE toggle flags in G2:I2:
=XOR(F2,G2:I2)
Expected final state: TRUE. One toggle reverses the state; two restore it; three reverse it again. A fourth TRUE toggle would produce FALSE. Replacing one of the three flags with FALSE leaves two actual toggles and also produces FALSE.
This is a finite Boolean model, not a record of real events or an instruction to change a device. Duplicate toggle entries are counted twice: XOR does not deduplicate identifiers or timestamps.
Referenced text, empty cells and errors
In K2:K5 enter =TRUE(), text Pending, a genuinely empty cell and =FALSE():
=XOR(K2:K5)
Expected result: TRUE, using one true and one false logical value while ignoring the text and empty cell under the documented rule. Replacing the true value with FALSE makes the result FALSE.
The lesson explicitly documents #VALUE! if a supplied range contains no logical values. A range containing only Pending and a genuinely empty cell is therefore not treated as a valid all-FALSE flag set. Numeric coercion, actual input errors and every array-entry context remain separately unverified.
Related logic and troubleshooting
Use OR for at least one true condition, AND for all conditions and NOT for reversal. Count the possible true inputs before deciding whether an exclusive-choice interpretation is valid.
The official page mentions Ctrl+Shift+Enter for array formulas. These controls use scalar results and direct Boolean references; no automatic spill or general multi-output behavior is inferred from that separate note.
References and verification
- WPS Academy: XOR lesson, 2019-06-17 (Chinese; Windows Personal scope).
- Editorial testing standards.
Worked outputs are independently calculated expectations, not captured native results. The dated source establishes the stated product scope, not every current client or build.