# CHOOSEROWS Function

> Return selected rows of an array or range with CHOOSEROWS in TX Sheet Control: row numbers, negative indexes from the end, spilling and the #VALUE! error.

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

---

Return the specified rows of an array or range. `array` is the array or range, and each `index` argument is the number of a row to return: 1 is the first row, and a negative number counts from the last row, so -1 is the last one. The rows are returned in the order of the arguments, and the result spills into the neighboring cells. An index of 0 or beyond the number of rows returns `#VALUE!`.

### Syntax

```text
CHOOSEROWS(array, index1, index2)
```

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

Available for supported offline calculation.

### Examples

```text
=CHOOSEROWS({1,2;3,4},2)
```

The formula returns the second row, the values 3 and 4.

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