# MATCH Function

> Find the position of a value in a row or column with MATCH in TX Sheet Control: exact, ascending and descending match modes, wildcards and search_mode.

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

---

Return the position of a value in a row or column. `lookup_value` is the value to find and `lookup_array` a single row or column. `match_mode` 1 (the default) finds the largest value that is less than or equal to `lookup_value` in an ascending list, 0 finds the first exact match, with the wildcards `*` and `?` for text, and -1 finds the smallest value that is greater than or equal to `lookup_value` in a descending list. Text is compared without regard to case. TX Sheet Control also accepts a fourth argument, `search_mode`: 1 (the default) searches from the first item, -1 from the last. A value that is not found, or a two-dimensional `lookup_array`, returns `#N/A`.

### Syntax

```text
MATCH(lookup_value, lookup_array, match_mode, search_mode)
```

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

Available for supported offline calculation.

### Examples

```text
=MATCH(3,{1,2,3},0)
```

The formula returns 3, because 3 is the third item of the array.

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:** [MAP Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/map/llms-full.txt)
- **Next:** [MAX Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/max/llms-full.txt)
