# XLOOKUP

lookup · from excel · excel: not yet compared · sheets: not yet compared

searches range and returns matching item

## signature

```
XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
```

returns: `any`

## arguments

- lookup_value: any — required
- lookup_array: range — required
- return_array: range — required
- if_not_found: any — optional
- match_mode: number — optional
- search_mode: number — optional

## examples

formula and result, asserted in the engine test suite.

| formula | result | with |
| --- | --- | --- |
| `=XLOOKUP("beta", C1:C5, A1:A5)` | `20` | C1=alpha, C2=beta, C3=gamma, C4=delta, C5=epsilon, A1=10, A2=20, A3=30, A4=40, A5=50 |
| `=XLOOKUP("zeta", C1:C5, A1:A5, "not found")` | `not found` | C1=alpha, C2=beta, C3=gamma, C4=delta, C5=epsilon, A1=10, A2=20, A3=30, A4=40, A5=50 |

## related

- [ADDRESS](https://deepcalc.com/functions/address.md) — returns a cell address as text from row and column numbers
- [AREAS](https://deepcalc.com/functions/areas.md) — returns the number of areas in a reference
- [HLOOKUP](https://deepcalc.com/functions/hlookup.md) — searches first row and returns matching value
- [HYPERLINK](https://deepcalc.com/functions/hyperlink.md) — the text a link displays — clickability is the renderer's
- [INDEX](https://deepcalc.com/functions/index.md) — returns value at row and column in range
- [INDIRECT](https://deepcalc.com/functions/indirect.md) — returns reference specified by text string
- [LOOKUP](https://deepcalc.com/functions/lookup.md) — looks up value in one-row or one-column range
- [MATCH](https://deepcalc.com/functions/match.md) — returns position of value in a range

## navigate

- [all lookup functions](https://deepcalc.com/functions/lookup-functions.md)
- [function index](https://deepcalc.com/functions.md) — all 598 functions
- [error values](https://deepcalc.com/errors.md) · [concepts](https://deepcalc.com/concepts.md) · [limits](https://deepcalc.com/limits.md)
- [everything in one file](https://deepcalc.com/llms-full.txt)

source: https://deepcalc.com/functions/xlookup