# UNIQUE Function

> Return the unique values or rows of an array or range with UNIQUE in TX Sheet Control: compare by column, values that occur exactly once, #CALC! and an example.

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

---

Return the unique values or rows of an array or range. When `by_col` is TRUE, UNIQUE compares columns instead of rows. When `exactly_once` is TRUE, it returns only the values that occur exactly once; if there are none, it returns `#CALC!`. The comparison of text is not case-sensitive.

### Syntax

```text
UNIQUE(array, by_col, exactly_once)
```

Category: Lookup. Minimum arguments: 1. Maximum arguments: 3.

Available for supported offline calculation.

### Examples

```text
=UNIQUE({1;2;1})
```

The formula returns a column with 1 and 2.

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:** [UNICODE Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/unicode/llms-full.txt)
- **Next:** [UPPER Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/upper/llms-full.txt)
