# XOR Function

> Return the exclusive OR of logical values with the XOR formula function of TX Sheet Control: odd counts of TRUE, numbers, ranges, #VALUE! errors and an example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > XOR Function
- **226 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/xor/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/xor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/xor/llms-full.txt

---

Return the exclusive OR of logical values: TRUE when an odd number of arguments is TRUE, and FALSE otherwise. The arguments are conditions, logical values or ranges; numbers count as TRUE unless they are 0, and text in referenced cells is ignored. Text typed as an argument returns `#VALUE!`. An array constant such as `{TRUE,TRUE,TRUE}` also returns `#VALUE!` in TX Sheet Control, while a range of the same values is evaluated.

### Syntax

```text
XOR(logical1, logical2)
```

Category: Logical. Minimum arguments: 1. Maximum arguments: 255.

Available for supported offline calculation.

### Examples

```text
=XOR(TRUE,FALSE,TRUE)
```

The formula returns FALSE, because two of the three arguments are TRUE.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [XNPV Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/xnpv/llms-full.txt)
- **Next:** [YEAR Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/year/llms-full.txt)
