Resources > Formula Help

How Do I Use XLOOKUP in Excel?

Last Updated: June 2026

Quick Answer

XLOOKUP searches for a value in one range and returns a matching value from another range. It is the modern replacement for VLOOKUP because it can look left, look right, return exact matches, and handle missing values more cleanly.

=XLOOKUP(lookup_value, lookup_array, return_array)

Basic XLOOKUP Example

If employee names are in column A and salaries are in column B, this formula finds Bob's salary:

=XLOOKUP("Bob",A:A,B:B)

XLOOKUP with a Cell Reference

Instead of typing the lookup value directly into the formula, you can reference a cell:

=XLOOKUP(E2,A:A,B:B)

This searches for the value in E2, looks through column A, and returns the matching result from column B.

Add a Message When Nothing Is Found

One of XLOOKUP's best features is the ability to return a custom message when there is no match:

=XLOOKUP(E2,A:A,B:B,"Not found")

Why XLOOKUP Is Better Than VLOOKUP

Common XLOOKUP Problems

1. Extra spaces

If two values look the same but do not match, one may contain extra spaces.

=TRIM(A2)

2. Numbers stored as text

A number stored as text may not match a true number. Check formatting if XLOOKUP returns unexpected results.

3. Wrong lookup range

Make sure your lookup array and return array are the same size.

Need Help with XLOOKUP?

If your lookup formulas are not working, I can help troubleshoot the workbook and build formulas that are easier to maintain.

Book Excel Help

Related Articles

Need help with Excel?
ExcelBot
Ask ExcelBot