VLOOKUP and XLOOKUP: A Step-by-Step Explanation
What is VLOOKUP and how is it used? The syntax, a step-by-step example, the most common mistakes and why to switch to XLOOKUP — a practical Excel guide.

There are two tables: one holds orders, the other customer phone numbers. Copying the phone next to each order by hand — half an hour for a hundred rows, all day for a thousand. VLOOKUP does that job with one formula. In Excel, the first formula that accelerates a career is usually this one.
The short answer to "what is VLOOKUP": a function that searches for a value in one table and brings back another column's data from that row. In this article you will see the syntax, a working example, the classic mistakes and when the more modern XLOOKUP is superior.
How VLOOKUP works: the syntax
The function has four parts:
=VLOOKUP(lookup_value; table_range; column_number; [exact_match])
| Argument | What it means | Example |
|---|---|---|
| lookup_value | What we are searching for | A2 (the customer code) |
| table_range | Where we search; the lookup value must be in the range's 1st column | Customers!A:D |
| column_number | Which column to bring from the found row | 3 (the phone column) |
| exact_match | FALSE (0) = exact search; in practice, almost always this | FALSE |
The memorable rule: VLOOKUP always looks left to right. The value you search must sit in the table range's first column; the result comes from the columns to its right. If you need to look left — that is already XLOOKUP's job.
A step-by-step example: adding phone numbers to orders
The situation: on the "Orders" sheet, column A holds the customer code. On the "Customers" sheet, column A is the code, column B the name, column C the phone.
- Go to the first cell of an empty column on the Orders sheet.
- Type:
=VLOOKUP(A2; Customers!A:C; 3; FALSE) - Enter; the code is found and the phone from the third column arrives.
- Drag the formula down; every row searches with its own code.
When a code is not found, the #N/A error will appear. That must be managed, not hidden: =IFERROR(VLOOKUP(...); "Not found"): a clear message instead of an error. But careful: a flood of "Not found" results usually points to a data problem, not a formula problem.
The 4 most common VLOOKUP mistakes
- Not locking the range: when you drag the formula down, the table range slides. Fix: use the
$A$1:$C$100format or whole columns (A:C). - Forgetting exact match: when the fourth argument is left blank, Excel searches "approximately" and quietly returns a wrong result. Always write FALSE.
- Invisible differences: "A101 " (with a trailing space) and "A101" are different values; so are "101" stored as a number and "101" stored as text. The TRIM function and a format check are the first defence.
- The column number breaking: when you add a new column to the table, "3" now lands on another column. That fragility is one of the main reasons to move to XLOOKUP.
XLOOKUP: what changes, and when to switch?
XLOOKUP, available in Microsoft 365, does the same job more cleanly:
=XLOOKUP(lookup_value; lookup_range; return_range; [if_not_found])
| Criterion | VLOOKUP | XLOOKUP |
|---|---|---|
| Searching left | No | Yes |
| Column-number dependence | Yes (fragile) | No; the ranges are stated directly |
| The not-found case | Needs a separate IFERROR | A built-in argument |
| Default mode | Approximate (risky) | Exact (safe) |
| Compatibility | All versions | Microsoft 365 / Excel 2021+ |
Practical advice: prefer XLOOKUP in new files. Knowing VLOOKUP is still necessary; work with old files, other people's spreadsheets and old Excel versions does not end. If you are a Google Sheets user, both functions work there with the same logic.
One step back: the data before the formula
An observation from experience: in most "VLOOKUP doesn't work" complaints, the culprit is not the formula but the table — duplicated codes, mixed formats, text with stray spaces. Five minutes of preparation (check duplicates, fix formats, run TRIM) solves half the formula problems in advance. A simple formula on tidy data beats a complex formula on messy data.
Frequently asked questions about VLOOKUP
Why does VLOOKUP return #N/A?
The most common causes: the value genuinely does not exist, there is a hidden space or format difference, or the searched column is not the table range's first. TRIM, a format check and the range's structure; a three-step diagnosis.
Can VLOOKUP search with two conditions?
Not directly. The classic solution is combining the conditions in a helper column (=A2&B2). The modern solution is multi-condition lookup with XLOOKUP or the INDEX/MATCH combination.
VLOOKUP or INDEX/MATCH?
INDEX/MATCH is more flexible (leftward search, resilience to column shifts) and is XLOOKUP's stand-in on old versions. If you have Microsoft 365, XLOOKUP simplifies both.
Does VLOOKUP slow down on a big table?
On tens of thousands of rows, whole-column searches can create noticeable lag. Narrowing the range, switching calculation to manual, or joining the data with Power Query restores the speed.
Professional support
Want to automate your Excel processes?
For diagnostics, priorities and implementation architecture, see the Business Process Automation service.
Sources and further reading
Where to verify the source
Function syntax can change with the version; check the exact arguments in the official documentation.
- Microsoft Support: VLOOKUP function: the official syntax and examples
- Microsoft Support: XLOOKUP function: the full description of the modern alternative
- Google Docs Editors Help: VLOOKUP: for the Google Sheets version
Continuing the topic
Lookup functions are one part of spreadsheet work; for the remaining skills:
- Learning Excel: a practical guide from zero
- The most important Excel formulas
- Pivot Tables: turn data into reports in seconds
- Google Sheets: the differences and advantages vs Excel
- Other articles on this topic
Run VLOOKUP once on your own real table; five minutes of practice teaches more than a hundred readings. The first column you would copy by hand in tomorrow's report is exactly that practice's material.
I'm Anar Rustamli - a strategist, entrepreneur, and AI adoption leader working at the edge of growth, technology, and human thinking. Since 2016, my work has focused on helping businesses evolve in a rapidly changing digital landscape. I design growth systems, AI-powered workflows, and strategic frameworks that align performance with purpose. I believe real growth happens when strategy, data, and human insight work together - and my mission is to help businesses adopt AI in a way that strengthens both their results and their identity.

