# INDEX Function

> Return a value by row and column from an array or range with INDEX in TX Sheet Control: whole rows and columns with 0, area_num, #REF! errors and an example.

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

---

Return the value at a given row and column of an array or range. `array` is the array or range, and `row_num` and `column_num` are the row and the column, counted from 1; for an array with a single row or column, `row_num` alone selects the value. A `row_num` or `column_num` of 0 returns the whole column or row as an array that spills. `area_num` selects the area of a reference with several areas, such as `(C1:C2,D1:D2)`, but in TX Sheet Control only the first area can be selected: an `area_num` of 2 or more returns `#REF!`. A position outside the array also returns `#REF!`.

### Syntax

```text
INDEX(array, row_num, column_num, area_num)
```

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

Available for supported offline calculation.

### Examples

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

The formula returns 4, the value in the second row and the second column.

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:** [IMTAN Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/imtan/llms-full.txt)
- **Next:** [INDIRECT Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/indirect/llms-full.txt)
