The XLOOKUP function in Excel, introduced in Office 365 and Microsoft 365, is a powerful addition to Excel's lookup functions. It improves upon the outdated and restrictive VLOOKUP function, offering more flexibility, accuracy, and ease of use. If you're new to using XLOOKUP in Excel, you've come to the right place. Let's dive into this tutorial and master XLOOKUP step by step.

Before we delve into XLOOKUP, let's ensure you're using the right version of Excel. Office 365 (including Excel 365) and Microsoft 365 users have access to XLOOKUP, while older versions of Excel may not support it. If you're unsure, you can check by typing '=XLOOKUP(' in a cell. If it works, XLOOKUP is present; if not, you may need to update your Excel version.

Understanding the XLOOKUP Syntax
The 'lookup\_la' is the value you're looking up, 'lookup\_array' is the range where your data is located, and 'return\_array' is the range containing the data you want to return. In the next sections, we'll learn how to use XLOOKUP effectively with examples.

Exact Match Lookups
The basic XLOOKUP function returns an exact match. If the 'lookup\_la' value is found in the 'lookup\_array', it returns the corresponding value from the 'return\_array'.

For instance, assume we have a list of fruits and their prices in cells A1:B6. To look up the price of 'Apple', we'd use: =XLOOKUP('Apple',A$1:A$6,B$1:B$6). If 'Apple' is found in column A, it returns the price from column B.
Approximate Matching with XLOOKUP
XLOOKUP also supports approximate matches, making it more versatile than VLOOKUP. To perform an approximate match, you need to add match\_mode as an argument: =XLOOKUP(lookup\_la, lookup\_array, return\_array, [match\_mode], [search\_mode]).

Using match\_mode set to 0 allows XLOOKUP to find the closest match in the 'lookup\_array'. Let's say you're looking for a value close to '25' in cells A1:A6. With =XLOOKUP(25,A$1:A$6,B$1:B$6,0), it'll return the value from column B that's closest to 25, even if '25' isn't in the list.
Working with Wildcards in XLOOKUP
XLOOKUP supports wildcards, allowing you to search for patterns rather than exact values. This is particularly useful when dealing with text data. Here are the wildcards you can use:

- Question mark (?) - Replaces a single character.
- Asterisk (*) - Replaces multiple characters.
Using Wildcards to Find Duplicate Values



















Let's say you want to find all duplicate loan amounts in column A. You can use the wildcard asterisk: =XLOOKUP(A2, A$2:A$10,0,"*"). This will return all loan amounts that are exactly the same as the one in cell A2.
To find partial matches, you can use the question mark wildcard: =XLOOKUP("1%",A$2:A$10,0,"*"). This will return all loan amounts starting with '1'.
Using XLOOKUP to Search and Replace Text
XLOOKUP can also be used in place of Excel's Find and Replace function. Assuming you have data in column A and you want to replace 'Old Text' with 'New Text', use: =IFERROR(XLOOKUP(A1,"Old Text","New Text","Not Found"),"Not Found"). This will replace 'Old Text' with 'New Text' in column A and output 'Not Found' if 'Old Text' is not found.
Combining XLOOKUP with INDEX and MATCH
For those who prefer using INDEX and MATCH, you can combine them with XLOOKUP to perform complex lookups. Here's a simple example of how you can create an INDEX MATCH with XLOOKUP:
=XLOOKUP(D2,INDEX(B2:B6, XMATCH(D2,A2:A6)),"Not Found")
In this example, D2 is the value to look up, and the XMATCH function finds the position of that value in the 'lookup\_array' (A2:A6). It then uses that position to return the corresponding value from the 'return\_array' (B2:B6). If the value is not found, it returns "Not Found".
In finale, XLOOKUP is an invaluable tool for Excel users. Whether you're working with large datasets, looking for pattern matches, or replacing text, XLOOKUP's versatility makes it an excellent addition to Excel's lookup functions. So, go ahead, explore its capabilities, and make your Excel tasks more efficient. Ready to take your XLOOKUP skills to the next level? Consider learning about more advanced features like XLOOKUP's error handling options and its ability to search in multiple columns.