✍️ Excel lookup examples

XLOOKUP Examples in Excel

Learn practical XLOOKUP examples for prices, departments, missing results and two-way lookups in Excel.

Updated 2026-06-125 practical examplesCopy-ready

What it does

XLOOKUP searches for a value in one range and returns a related value from another range. It is usually the best modern lookup formula for new workbooks.

Syntax or pattern

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

5 practical examples

1

Find a product price

Look up the price for the product name in A2 from a product list.

=XLOOKUP(A2, Products[Product], Products[Price], "Not found")

This searches the Product column and returns the matching Price.

2

Find an employee department

Return the department assigned to an employee ID.

=XLOOKUP(E2, Staff[ID], Staff[Department], "Check ID")

This is useful when IDs are unique and names may repeat.

3

Return a value from the left

Look up a product code and return the product name from a column to the left.

=XLOOKUP(D2, Products[Code], Products[Product])

Unlike VLOOKUP, XLOOKUP can return values from either side.

4

Use a friendly missing message

Show a clear message when the lookup item is not in the list.

=XLOOKUP(A2, Customers[Email], Customers[Name], "No customer found")

A helpful not-found message makes reports easier to read.

5

Two-way lookup by row and column

Find the sales amount for a selected product and month.

=XLOOKUP(H2, Products[Product], XLOOKUP(H3, Sales[#Headers], Sales))

Nested XLOOKUP can choose the column first and then return the matching row value.

Common mistakes to avoid

  • Using lookup and return ranges with different sizes.
  • Forgetting the not-found argument.
  • Using approximate match when exact match is required.

Related Excel examples

FAQ

Is XLOOKUP better than VLOOKUP?

For most new workbooks, yes. XLOOKUP is more flexible and easier to maintain.

Can XLOOKUP return multiple columns?

Yes, if the return array includes multiple columns in supported Excel versions.

💡 Useful resources

Here are some ideas for you

Optional resources that may help if you are learning formulas, building reports, or working in spreadsheets often.

  • 📘
    Excel formula books

    Practice formulas with structured examples you can keep beside your desk.

    See ideas
  • ⌨️
    Excel shortcut guides

    Build speed with keyboard shortcuts for selection, formatting and navigation.

    See ideas
  • 🔢
    Numeric keypads

    Helpful if you enter many numbers on a laptop or compact keyboard.

    See ideas
  • 🖥️
    External monitors

    Useful for viewing large worksheets, formulas and reference tables side by side.

    See ideas
  • 📒
    Desk notebooks

    Sketch formula logic, report ideas and table structures before building.

    See ideas
  • 💻
    Laptop stands

    Make long spreadsheet sessions more comfortable and ergonomic.

    See ideas

Some links in this section may be affiliate links. Choose only what is useful for your own work.