# FILTER Function

> Filter an array by a condition with the FILTER formula function of TX Sheet Control: the include array, spilled results, if_empty, #CALC! and #VALUE! errors.

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

---

Filter an array by a condition. `include` is an array of TRUE and FALSE values with the same height or width as `array`, and FILTER spills the rows or columns where it is TRUE. When nothing matches, FILTER returns `if_empty`, or `#CALC!` when it is omitted; an `include` array of another size returns `#VALUE!`.

### Syntax

```text
FILTER(array, include, if_empty)
```

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

Available for supported offline calculation.

### Examples

```text
=FILTER({1;2;3},{FALSE;TRUE;TRUE})
```

The formula returns the array {2;3}, the rows whose include value is 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:** [FIELDVALUE Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/fieldvalue/llms-full.txt)
- **Next:** [FILTERXML Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/filterxml/llms-full.txt)
