How to Use XLOOKUP in Excel: A Complete Step-by-Step Productivity Guide

If you are still using VLOOKUP or HLOOKUP, you are working harder than you need to. Microsoft introduced XLOOKUP to solve almost every limitation of older lookup functions. It is more flexible, easier to read, and less prone to errors when you add or remove columns in your spreadsheet. In this guide, we will show you how to master XLOOKUP to boost your data productivity.

Step 1: Understand the XLOOKUP Syntax

Before diving into the steps, it is important to understand what the formula requires. The basic syntax for XLOOKUP is: =XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]). While there are six arguments, you usually only need the first three:

  • lookup_value: What you are searching for.
  • lookup_array: Where to look for that value.
  • return_array: The range containing the data you want to retrieve.

Step 2: Perform a Basic Vertical Lookup

Imagine you have a list of Employee IDs in Column A and their Names in Column B. To find the name of the employee with ID "105", follow these steps:

  • Select the cell where you want the result.
  • Type =XLOOKUP("105", A:A, B:B).
  • Press Enter.

Unlike VLOOKUP, you do not need to count column index numbers, and your return_array can be to the left of your lookup_array.

Step 3: Handle Errors with the "If Not Found" Argument

One of the best productivity features of XLOOKUP is the built-in error handling. In the past, you had to wrap formulas in IFERROR. Now, you can simply add a custom message within the formula:

  • Type =XLOOKUP("105", A:A, B:B, "Employee Not Found").
  • If the ID does not exist, Excel will return "Employee Not Found" instead of the dreaded #N/A error.

Step 4: Use XLOOKUP for Horizontal Lookups

XLOOKUP replaces HLOOKUP entirely. If your data is arranged in rows rather than columns, the process remains the same:

  • Identify your lookup row (e.g., Row 1) and your result row (e.g., Row 5).
  • Type =XLOOKUP("Sales", 1:1, 5:5).
  • Excel will search horizontally across Row 1 and return the corresponding value from Row 5.

Step 5: Perform Partial Matches with Wildcards

If you only know part of a name or code, XLOOKUP can handle wildcards. To do this, you must change the [match_mode] argument to 2:

  • To find a name starting with "Smi", type: =XLOOKUP("Smi*", A:A, B:B, "No Match", 2).
  • The * acts as a wildcard, allowing Excel to find "Smith" or "Smithson".

Why XLOOKUP is Better for Productivity

XLOOKUP defaults to an Exact Match, which prevents the common mistakes people make with VLOOKUP's default "Approximate Match." Furthermore, because you select specific ranges instead of a whole table array, your formulas won't break when you insert or delete columns in your spreadsheet. Mastering this one formula can save you hours of troubleshooting and manual data entry.


💡 Pro Tip: Keep your software updated to avoid these issues in the future.


Category: #Software