# IFS Function

> Check several conditions in order and return the result of the first true one with IFS in TX Sheet Control: condition pairs, a default, #N/A and #VALUE!.

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

---

Check conditions in order and return the result of the first one that is true. The arguments are pairs of a condition and its result, up to 127 pairs; a number other than 0 counts as TRUE. When no condition is true, IFS returns `#N/A`; add TRUE as the last condition for a default result. A condition that is text, or a condition without a result, returns `#VALUE!`.

### Syntax

```text
IFS(test_or_expression, result, test_or_case, result)
```

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

Available for supported offline calculation.

### Examples

```text
=IFS(FALSE,1,TRUE,2)
```

The formula returns 2, the result of the first true condition.

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:** [IFNA Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/ifna/llms-full.txt)
- **Next:** [IMABS Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/imabs/llms-full.txt)
