> For the complete documentation index, see [llms.txt](https://enable-advisory-1.gitbook.io/the-way-we-work/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enable-advisory-1.gitbook.io/the-way-we-work/microsoft-excel/xlookup.md).

# XLOOKUP

**Syntax:**

\=XLOOKUP(lookup, lookup\_array, return\_array, \[not\_found], \[match\_mode], \[search\_mode])

**Explanation:**

* *lookup* - The lookup value.
* *lookup\_array* - The array or range to search.
* *return\_array* - The array or range to return.
* *not\_found* - \[optional] Value to return if no match found.
* *match\_mode* - \[optional] 0 = exact match (default), -1 = exact match or next smallest, 1 = exact match or next larger, 2 = wildcard match.
* *search\_mode* - \[optional] 1 = search from first (default), -1 = search from last, 2 = binary search ascending, -2 = binary search descending.

**Example:**

<figure><img src="https://1421118769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdtjvomCsvuXz1wFFAA%2Fuploads%2F9qDLn3272VWLxsGZd9ST%2Fimage.png?alt=media&amp;token=1e541a63-8ff0-44a9-9745-782410bfd341" alt=""><figcaption></figcaption></figure>

**Notes:**

XLOOKUP is a modern **replacement for the VLOOKUP** function. It is a flexible and versatile function that can be used in a wide variety of situations.

XLOOKUP can find values in **vertical or horizontal** ranges, can perform approximate and exact matches, and supports wildcards (\* ?) for partial matches. In addition, XLOOKUP can search data starting from the first value or the last value (see match type and search mode details below). Compared to older functions like VLOOKUP, HLOOKUP, and LOOKUP, XLOOKUP offers several key advantages.
