This page isn't translated yet, so its text is in English. Function names and formulas are shown in your Excel language.
Excel function · Lookups
RECHERCHEX(XLOOKUP)
Finds a value in one range and returns the matching item from another.
What it does
XLOOKUP is the modern lookup. You give it the range to search and the range to return separately, so it can look in any direction, and it matches exactly unless you ask for something else. It's in Excel 2021 and later, Excel for Microsoft 365 and Excel for the web.
Syntax
=RECHERCHEX(lookup_value; lookup_array; return_array; [if_not_found]; [match_mode]; [search_mode])Arguments in square brackets are optional, and … means you can add more of the same. In this Excel language, arguments are separated by ;
Arguments
- lookup_value
- What to look for.
- lookup_array
- The range to search.
- return_array
- The range to return a value from, the same size as the search range.
- if_not_found
- What to show when there's no match. Without it you get #N/A.
- match_mode
- 0 (the default) for an exact match. Other values accept the next smaller or larger item, or wildcards.
- search_mode
- 1 (the default) searches from the first item, -1 from the last, which finds the latest entry.
Example
What's Kai's email address?
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Member | Look for | |||
| 2 | Ana | ana@example.com | Kai | kai@example.com | |
| 3 | Ben | ben@example.com | |||
| 4 | Kai | kai@example.com |
The formula in E2:
=RECHERCHEX(D2;A2:A4;B2:B4;"not found")Result: kai@example.com
Kai is the third name in A2:A4, so XLOOKUP returns the third item of B2:B4. If the name were missing, the fourth argument would show "not found".
Common mistakes
- Search and return ranges of different sizes give a #VALUE! error.
- Sharing the file with someone on Excel 2019 or older, where
XLOOKUPdoesn't exist and shows #NAME?.
In other Excel languages
Excel translates function names, and in some languages the argument separator too. Type the name your Excel shows.
| Excel language | Function name | Separator |
|---|---|---|
| English | XLOOKUP | , |
| Deutsch | XVERWEIS | ; |
| Français | RECHERCHEX | ; |
| Español (España) | Not confirmed yet | ; |
| Español (México) | Not confirmed yet | , |
| 日本語 | XLOOKUP | , |
| 한국어 | XLOOKUP | , |
| 繁體中文 | XLOOKUP | , |
| ไทย | XLOOKUP | , |
| ខ្មែរ | XLOOKUP | , |
| Tiếng Việt | XLOOKUP | ; |