# CHOOSE Function

> Pick one of up to 254 values by its position with the CHOOSE formula function of TX Sheet Control: the index argument, truncation and the #VALUE! error.

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

---

Return one value from a list of values by its position. `index_num` selects the value: 1 returns `value1`, 2 returns `value2` and so on, for up to 254 values. A fraction is truncated to an integer. An index less than 1 or greater than the number of values, or text that is not a number, returns `#VALUE!`.

### Syntax

```text
CHOOSE(index_num, value1, value2)
```

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

Available for supported offline calculation.

### Examples

```text
=CHOOSE(2,"a","b")
```

The formula returns "b", the second value.

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:** [CHITEST Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/chitest/llms-full.txt)
- **Next:** [CHOOSECOLS Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/choosecols/llms-full.txt)
