XLOOKUP in Excel, Step by Step

Every argument explained in order, worked through with a real example

This page builds an XLOOKUP formula up one step at a time, using a small invoice table as the running example. Rather than presenting the finished formula first, each step below adds one argument, so it's clear what each piece is doing and why it's positioned where it is.

By the final step, the same process applies to any similarly structured lookup table, whether it holds invoices, customer records, or inventory - the step-by-step logic stays identical even as the underlying data changes.

Turbo Excel VLookup

Turbo Excel VLookup
App Screenshots
Lookup and Merge tab - VLOOKUP XLOOKUP replacement
Match mode and return option selection
Lookup statistics and match percentage report
Join tab - Left Right Inner Full Outer Anti Semi Cross join
Duplicates tab - duplicate record finder
Data Cleaning tab - trim normalize and clean columns
Formula Generator tab - VLOOKUP XLOOKUP INDEX MATCH formula builder
Reports tab - session log of lookups joins and exports
Export options - XLSX CSV TSV output settings
Key Column Pairs - multi-key composite matching setup
License activation screen - Gumroad key entry
Help tab - built-in usage guide and tips
Enlarged application screenshot
Step 1: Identify What You're Searching For

Using this invoice table, the goal is to find the Client for INV-3303:

Invoice NoClientAmount DueDue Date
INV-3301Sundar Traders2450012-Sep-2026
INV-3302Kavya Textiles1890020-Sep-2026
INV-3303Om Enterprises3120028-Sep-2026

The lookup_value is "INV-3303", found in the Invoice No column.

Step 2: Point to the Lookup Column Only

Unlike VLOOKUP's combined table_array, XLOOKUP's lookup_array points only at the Invoice No column itself: A2:A4.

Step 3: Point to the Column You Want Returned

return_array points directly at the Client column: B2:B4. There's no counting involved - you select the exact column you want back.

=XLOOKUP("INV-3303", A2:A4, B2:B4) // returns "Om Enterprises"
Step 4: Add a Fallback for Missing Matches (Optional)
=XLOOKUP("INV-9999", A2:A4, B2:B4, "Invoice not found") // returns the custom message instead of #N/A
Step 5: Scale Up to a Full Invoice List

For matching many invoice numbers at once instead of typing this formula repeatedly, Turbo Excel VLookup runs the same lookup across an entire invoice register in a single action.

Confirming a Match Visually

Selecting the lookup_array and return_array portions of a formula and pressing F9 shows their calculated values directly in the formula bar, which is a fast way to confirm both ranges are pointing at the expected data before assuming there's a deeper problem.

Keeping Source Data and Working Data Separate

Editing the same range that lookup_array and return_array point to, especially while rows are being sorted or filtered, is a common source of confusing results. A clearly separated source sheet that's rarely edited directly reduces that risk.

Choosing Between Exact and Approximate Match Modes

XLOOKUP's optional fifth argument, match_mode, defaults to an exact match, but it also supports approximate matches - either the next smaller or next larger value when no exact match exists - by passing -1 or 1 instead of the default 0.

This is useful for scenarios like matching a score against grade thresholds, where an exact match won't always exist but the closest applicable bracket still needs to be found.

Frequently Asked Questions

What is lookup_array in XLOOKUP?

The single column being searched for a matching value - unlike VLOOKUP, it doesn't include the return column.

What is return_array in XLOOKUP?

The column that contains the value to return, selected as a separate range from lookup_array.

Do lookup_array and return_array need to be the same size?

Yes, they must contain the same number of rows or Excel returns a #VALUE! error.

How do I handle a missing invoice number gracefully?

Add an optional fourth argument specifying the value to return when no match is found.

Can return_array be to the left of lookup_array?

Yes, XLOOKUP doesn't require any particular position between the two ranges.

What's a faster way to match an entire invoice register?

Turbo Excel VLookup applies the same match to every invoice number in a dataset at once.

Does the order of rows in the source data matter for an exact match?

No, an exact match search works regardless of row order; only an approximate match requires sorted data.

Is it safe to have duplicate values in the lookup column?

A lookup formula will only return the first matching row it finds, so duplicates can silently return the wrong record if not accounted for.

Should I test a new formula on one row before applying it everywhere?

Yes, verifying a single result against the source data first catches setup mistakes before they're copied across an entire column.

Is it a good idea to edit source data while formulas are actively referencing it?

It's safer to keep a stable source sheet separate from a working sheet, since editing referenced data mid-use can produce confusing intermediate results.

Ready to stop fighting #N/A errors and match your spreadsheets visually?

Related guides and tools

This guide is part of TurboSoft’s Excel lookup and matching resources. Turbo Excel Lookup handles all of these tasks offline on Windows.

Get Turbo Excel Lookup →