6 min read

How to Use XLOOKUP

The newer, smarter lookup — and why it's worth switching from VLOOKUP whenever you can.

What Is XLOOKUP?

XLOOKUP is a lookup function that searches for a value and returns corresponding information from another location.

For example, if a spreadsheet contains employee records, XLOOKUP can locate an employee ID and return the employee's name, department, or salary.

Unlike older lookup functions, XLOOKUP was designed to be easier to read and maintain.

This makes spreadsheets more reliable and easier to troubleshoot.

Why Microsoft Introduced XLOOKUP

Although VLOOKUP remains popular, users frequently encountered problems such as: searching only from left to right, dependence on column numbers, broken formulas when columns changed, and complex workarounds for advanced searches.

XLOOKUP addresses many of these challenges directly.

The result is a function that is more flexible while remaining relatively easy to learn.

The Basic Structure

A typical XLOOKUP formula looks like this:

=XLOOKUP(lookup_value, lookup_array, return_array)

The function needs three key pieces of information:

  1. What value to find
  2. Where to search
  3. What information to return

This structure is often easier to understand than older lookup functions.

A Simple Example

Consider the following table:

Employee ID Name Department
1001 Sarah Sales
1002 David Finance
1003 Emma Marketing

The formula:

=XLOOKUP(1002,A2:A4,B2:B4)
returns:; *David*; Excel searches for Employee ID 1002 and returns the matching name.; ## No More Column Numbers; One of the biggest advantages of XLOOKUP is that it does not rely on column index numbers.; With VLOOKUP, users often write formulas such as:.text id="u2p9ea"
=VLOOKUP(A2,D:G,3,FALSE)

The number:

3

indicates which column should be returned.

If the table structure changes, the formula may break.

XLOOKUP eliminates this problem by using explicit ranges instead.

This makes formulas easier to understand and maintain.

Searching in Any Direction

VLOOKUP can only search from left to right.

XLOOKUP can search: left to right, right to left, top to bottom, and bottom to top.

This flexibility allows users to build spreadsheets without worrying about lookup limitations.

It also reduces the need for restructuring data.

Handling Missing Results

Missing data is common in real-world spreadsheets.

XLOOKUP includes built-in support for custom messages when no match is found.

Example:

=XLOOKUP(A2,D:D,E:E,"Not Found")

Instead of displaying:

#N/A

Excel returns:

Not Found

This creates cleaner reports and improves the user experience.

Common Business Applications

XLOOKUP is useful in many workplace scenarios.

Examples include:

Employee Records

Find names, departments, or salaries based on employee IDs.

Product Catalogs

Retrieve descriptions, prices, or inventory information.

Customer Databases

Match customer numbers with account details.

Financial Reports

Connect data from multiple worksheets and reports.

These tasks are common across many industries.

Common XLOOKUP Errors

Although XLOOKUP is easier to use than many older functions, errors can still occur.

Typical causes include: incorrect lookup values, missing records, typographical errors, inconsistent formatting, and extra spaces in imported data.

Carefully reviewing source data usually resolves most lookup problems.

XLOOKUP vs VLOOKUP

Both functions can perform many of the same tasks.

However, XLOOKUP offers several advantages:

Feature VLOOKUP XLOOKUP
Searches left to right only Yes No
Requires column numbers Yes No
Custom not-found message Limited Yes
Easier to maintain No Yes
Modern design No Yes

For new spreadsheets, many users prefer XLOOKUP whenever it is available.

Should You Learn XLOOKUP?

Absolutely.

While VLOOKUP remains important because of older spreadsheets, XLOOKUP is increasingly becoming the preferred lookup solution in modern Excel environments.

Learning both functions provides the greatest flexibility, but many users find XLOOKUP easier to understand and less prone to errors.

The Future of Spreadsheet Lookups

XLOOKUP represents Microsoft's effort to modernize one of the most important spreadsheet tasks: finding and retrieving information.

By simplifying formula construction, reducing maintenance challenges, and improving flexibility, XLOOKUP helps users work more efficiently with data.

For anyone building new spreadsheets today, understanding XLOOKUP is one of the most valuable Excel skills to develop.

Spreadsheet hub

Excel Tools

Free Excel and spreadsheet tools — formula helpers, converters, and data cleaners.

Open Excel Tools

Frequently asked questions

XLOOKUP searches for a value in a dataset and returns related information from another column or row.
Back to Excel Tools