Beginners Guide to EXCEL XLOOKUP

One of the more exciting software features to be released in Excel is the XLOOKUP function. Just looking at the name, you might think I did a typo and meant VLOOKUP. No, this is an entirely new spreadsheet function that makes looking up data easier with fewer limitations on your lookup column.

In fact, Microsoft recommends that you use it over VLOOKUP or HLOOKUP. The catch is that this lookup function is not available to all Excel users.

How to Get XLOOKUP

To start, this new lookup function is only available with Microsoft 365 (Previously known as Office 365). If you use one of the non-subscription versions of Microsoft Office or Excel, such as Excel 2019, you’re out of luck.

To check your availability, go to your Formulas tab and click Insert Function. The Insert Function dialog will open with all your functions. XLOOKUP should show under the Lookup & Reference category between VLOOKUP and another new function called VMATCH.

Listing of Lookup & Reference functions with XLOOKUP highlighted.

Why is XLOOKUP Better?

The question on most peoples’ minds is, what’s better? After all, who wants to learn something that doesn’t add value for Excel users. Here’s a shortlist I can see from playing around with various lookup scenarios:

  • This function can work either vertically or horizontally. This is in contrast to VLOOKUP and HLOOKUP, which are mostly locked to their orientation.
  • You’re not dependent on a sorted list.
  • You don’t have to worry about the function breaking if you add or remove columns.
  • It defaults to an exact match. If this is your preferred match type, then it’s one less argument you have to state.
  • You’re not dependent on the first column.
  • Your return array can be to the left of your lookup column.

There are more advantages in using wildcards, different search modes, and match modes like approximate matches. However, those are not covered in this introductory tutorial.

About This Example & Formula

For this XLOOKUP tutorial, I’ll be using a simple Excel workbook with 2 sheets. You can download it from the Additional Resources section.

My goal is to populate Column C with the correct Periodic Table number that will be returned from Column H.

By default, XLOOKUP will perform an exact match mode on my stated lookup value, which is the element name. To do this, I’ll search off the common field “Name,” which appears in both ranges.

Highlighted names column showing relationship.

I’ve also added a second tab to the workbook called “Horizontal.” It contains the same information, but the data is laid out differently so you can see the function’s additional versatility. This worksheet also has the formula added.

You’ll also note that I’m adding the formula using Insert Function and the Function Arguments dialog. I find this method easier when you’re learning a new function. But, there is nothing to prevent people power users from using the formula bar and entering in a string like:


Breaking Down the XLOOKUP Function

The function has 5 arguments, but the last two are optional. These optional arguments are for “Match Mode” and “Search Mode.” Excel notes this by making the mandatory arguments in a bold typeface.

[A] The Lookup_value represents the cell Excel will use to find a corresponding value from the Lookup_array. In this screenshot, we’ll be looking for “Californium” from cell B2. It is also noted in quotes to the right of the textbox.

Function Argument dialog showing Lookup_value populated with B2.

[B] The Lookup_array represents the cell range a matching Lookup_value can be found. In this example, we’re telling the application to lookup Californium from cell B2 and find the same value in column I. I added the $ signs to make an absolute range.

Function Arguments dialog with Lookup_array populated with Column I range.

[C] The Return_array represents where our answers can be found. We’re telling Excel that once it finds the matching Californium from column I to go across and find the value from column H. In this example, I’m looking in a column to the left. I’ve highlighted the match in yellow.

Function Arguments dialog with Return_array value for column H.

Once Excel matched Californium, it then looked up the Periodic No. The query returned 98, which shows at the bottom of the argument list and the Formula result = line at the bottom.

How to Use XLOOKUP

For this tutorial, I’ll be using Microsoft 365 and the xlookup-elements-examples.xlsx spreadsheet. You can find it in the Additional Resources section. The workbook has 2 sheets. One example is a common lookup, whereas the second one includes a horizontal lookup and the formula.

  1. Download the spreadsheet from the Additional Resources section.
  2. Select the Vertical worksheet.
  3. Click in cell C2. This is where we will put the lookup formula.
  4. Click the Formulas tab.
  5. Click Insert Function. The Insert Function dialog appears.
  6. In the Search for a function: textbox, type xlookup.
Insert Function dialog with ALL category selected and xlookup in search textbox.
  1. Click Go.
  2. Click OK to accept XLOOKUP. A blank Function Arguments dialog appears.

Note: If XLOOKUP doesn’t appear, then you don’t have the function yet.

  1. With your cursor in the Lookup_value field box, click cell B2. This is the field we want to match.
  2. Tab to advance to Lookup_array. This is the cell range that has matching values for column B.
  3. Select cells I2 through I25.
  4. Press F4 to make an absolute range.
  5. Tab to advance to Return_array. This is the range that contains our answers.
  6. Select cells H2 through H25.
  7. Press F4 to make an absolute range. You should see a result in the Formula result = line.
  8. Click OK. You should see 98 in cell C2.
Periodic number for Californium displayed in cell C2.
  1. With your cursor in cell C2, drag the fill handle to copy the XLOOKUP formula down the column.

And don’t worry if you still want to use the VLOOKUP and HLOOKUP functions. Microsoft doesn’t have any plans to retire these functions.

Additional XLOOKUP Resources

Microsoft 365 Personal | 12-Month Subscription, 1 person| Premium Office Apps | 1TB OneDrive cloud storage | PC/Mac Download
Bring out your best with premium Office apps, including Word, Excel, and PowerPoint.; Enjoy the flexibility to use multiple PCs, Macs, iPads, iPhones and Android phones.

Disclaimer: Images from Amazon Product Advertising API. I may receive an affiliate commission on these products if you buy. Updated: 2021-04-18