VLOOKUP searches the leftmost column of a range and returns a value from a column you specify. The formula is =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]), and the fourth argument decides everything: FALSE or 0 gives an exact match, TRUE or 1 gives an approximate match. That single choice separates clean lookups from wrong prices in nearly every broken workbook you'll encounter. This guide walks the exact-match path first because that's what most business lookups need.
What Each of VLOOKUP's Four Arguments Actually Controls
The first argument is the lookup value, and it must sit in the leftmost column of whatever range you hand the function. The second is the table array, your search block. The third is the column index counted from the left edge of that block, not from column A. The fourth is the match mode, and skipping it is the single most common cause of quietly wrong answers.
Count the column index before you type anything. A block stretched from B2 to F200 makes column B index 1, C index 2, D index 3, E index 4, and F index 5. If you later insert a column in the middle of the block, every hard-coded index shifts and the formula starts returning the neighbouring field with no error message. Structured references or a separate column that stores the index number both survive that edit better than a typed constant.
Exact match means VLOOKUP accepts only identical values: no partial words, no trailing spaces, no number stored as text. Approximate match is a different tool entirely, designed for banded lookups such as tax brackets and grade thresholds, where the first column must be sorted ascending and the function returns the largest value at or below the lookup.
Wrap the function's failure output in an error handler once the core formula works. =IFNA(VLOOKUP(B2,Data!A:F,4,FALSE),"Not found") swaps the ugly #N/A for a plain label or a blank. Excel's own help material documents IFNA as the modern replacement for IFERROR when you only want to trap lookup misses, because IFERROR hides genuine formula mistakes too.
Write your first formula by hand rather than clicking the wizard. Typing it exposes which argument you're unsure about. Then verify the return by finding the same record manually with Ctrl+F and comparing the values side by side. One manual cross-check per new table saves you from shipping a whole column of plausible-but-wrong numbers.
Exact-Match Steps for a Product-to-Price Lookup
Build a small sample first: a price list on one sheet with product codes in column A and prices in column C, then a blank sales sheet where you'll type codes in column A and pull prices into column C. Once the pattern works on ten rows, stretching it to two thousand costs nothing extra.
1: Click the cell that should hold the first result, for example C2 on the sales sheet. 2: Type =VLOOKUP(A2,Prices!$A:$C,3,FALSE) and press Enter. Wrap the sheet reference in single quotes if the sheet name contains a space, as in 'Price List'!$A:$C. 3: Confirm the returned number matches the price list by using Ctrl+F on the price sheet for that product code. 4: Drag the fill handle down column C. The A2 reference shifts row by row; the absolute references stay locked. 5: Copy the results and paste as values if the price list will change later and you need a frozen record. 6: Scan the column for #N/A before anything else. Each one is a code that exists on one sheet and not the other.
When a miss appears, resist editing the formula first. Click the lookup cell, press F2, and check what character sits in front of the code. Find & Replace on the sheet with Ctrl+H swaps the offending character for nothing, or use TRIM in a helper column to strip stray whitespace without touching the source data.
The Sorted-Table Trap in Approximate Match
Leave the fourth argument out and Excel assumes TRUE, an approximate match. Against an unsorted first column, that default can return a near-miss price with no warning. Against a sorted list of codes, it typically produces #N/A. Neither outcome looks like a formula error, which is why so many teams distrust VLOOKUP itself rather than their own settings.
Left as optional in many tutorials, the argument is mandatory in practice. Microsoft's support documentation for VLOOKUP states the default plainly: omit the fourth argument and Excel uses an approximate match, so you need TRUE or 1 only for banded lookups. Add FALSE to every exact-match formula you build, including the ones in old workbooks that seem fine. A quiet wrong number costs more than a visible error.
Approximate match has legitimate work. A commission table keyed on revenue bands, a discount grid keyed on order size, or a tax schedule keyed on income all rely on ascending order and a last value at or below the lookup. Sort the threshold column ascending and confirm the function returns the band's rate, not the row above or below, on a test value that lands exactly on a boundary.
One serious caveat applies to approximate mode. If a break-even or threshold row is missing from the table, the lookup silently lands in the wrong band and returns an adjacent value. Do a boundary check on the exact threshold number every time you change a threshold table. Test at the band floor and one cent below it, not just in the middle.
Why #N/A Appears When the Value Looks Identical
The most common cause is a text-versus-number mismatch. One table stored order IDs as text with leading zeros, the other as numbers. Both look identical on screen, but 00123 is text and 123 is numeric, so VLOOKUP sees no match. A helper cell with =ISTEXT(A2) tells you which side is the text one.
Trailing spaces are harder to spot. A cell pasted from an exported report may contain "SKU-1042 " with a space, and the formula returns #N/A even though your eyes say the values match. Select the lookup column and run TRIM through a helper column, or use Find & Replace on the data rather than the formula. Fix the data; formulas that cope with dirty data hide the underlying mess forever.
Once the data is clean, wrap the output so a real miss still reads clearly: =IFERROR(VLOOKUP(A2,Prices!$A:$C,3,FALSE),"Missing SKU"). Use IFERROR for a catch-all, IFNA for the narrower case. If you then run SUM over the column, text labels become invisible to the total, which is safer than a #N/A that poisons the whole sum.
Absolute References and Stretching a Lookup Across Thousands of Rows
Anchor both ends of the table array with dollar signs before you fill. $A$2:$D$500 locks the block, while A2 stays relative and moves with each copied row. Press F4 while the cursor sits on a reference to cycle through the absolute combinations. Skipping this step is the second-most-common formula failure: only the first row returns anything, and rows 3 onward point at empty space.
For a fixed, infrequently edited table, referencing entire columns with a form like Prices!$A:$D survives insertions and deletions in the source sheet that break a row-limited range. The cost is slight: a whole-column lookup scans far more cells than a bounded one. In a workbook with 20 formula columns across 50,000 rows, that overhead becomes noticeable during recalculation, so match the reference style to the table's volatility and size.
As rows accumulate, split out one thing VLOOKUP handles badly: dirty data from an upstream CSV. Fix it in Power Query at the import boundary rather than polishing sheets after the fact. That way each VLOOKUP sees only clean types and the error handler almost never fires.
Locking a block also pays off during sorting. If you sort the source table after building formulas that point at specific unlocked rows, the references follow the moved cells and quietly change what they return. Table objects sidestep this because their names expand and contract with the data.
XLOOKUP vs. VLOOKUP and INDEX-MATCH on the Same Task
| Task | VLOOKUP | XLOOKUP | INDEX-MATCH |
|---|---|---|---|
| Look up to the left of the key | Not possible | Works | Works |
| Insert a column in the middle of the range | Breaks silently | Keeps working | Keeps working |
| Default match mode | Approximate | Exact | Varies by MATCH argument |
| Available in which Excel versions | All modern Excel builds | Excel 365 and Excel 2021 onward | All versions |
| Highest-level error feedback | #N/A | "Value not found" | #N/A |
| Fixed risk when the last argument is omitted | Wrong number, no error | Not applicable | #N/A from MATCH |
XLOOKUP ships with Excel 2021 and Microsoft 365, but workbooks opened in Excel 2019 or earlier return a #NAME? error, so anyone sharing files across organisations should verify recipients' versions first. INDEX with MATCH has worked in every version for two decades and handles leftward lookups that VLOOKUP simply can't perform. Column-index brittleness remains the key reason a lookup fails β and why intending to "upgrade the formula later" rarely happens.
If a returned value is off by exactly one column or one row, audit the third argument and the table array's start column before suspecting the function. Count the columns in the block's header again, then update the formula once and recheck the first four rows against the source.
Legacy matters. Companies still run Excel 2016 in finance and operations. If you're the person writing the workbook, build with whatever version your colleagues actually open. Otherwise the cleverest formula becomes the one nobody can troubleshoot.
Combining VLOOKUP With MATCH to Survive Column Insertions
Swap the fixed column number for a MATCH that finds the header by name: =VLOOKUP($A2,Prices!$A$1:$Z$500,MATCH("Price",Prices!$A$1:$Z$1,0),FALSE). Now inserting a column in the middle no longer shifts the result. The trade is that the header text inside MATCH becomes another thing to keep exact, so use it for wide tables that change layout often.
The same approach protects against renamed ranges. If you store entire lookup ranges as defined names, changing the underlying cells once updates every formula that points at the name. This helps in workbooks maintained by several people, where nobody wants to audit a thousand cells after a schema change.
Performance is worth a moment. A few hundred VLOOKUPs across a large table run quickly, while tens of thousands combined with full-column ranges drag on a slower laptop. If your workbook sits at 100,000 lookups and calculation spikes, that's the point to reduce the reference to a bounded range or pre-compute results. The fix is reshape or freeze, not add another formula.
Testing pays for itself here too. Keep a small sheet of known inputs and expected outputs, re-run it after every edit, and catch a broken column reference in ten seconds rather than a month later. Results trimmed with LEFT and RIGHT and pasted back need retyping into a clean column before comparison, or mismatched types will make every row look like a #N/A.
Five Mistakes That Cause Silent Wrong Answers
Missing the fourth argument tops the list. It hands you an approximate match when you wanted exact, and the resulting number may look right. Add FALSE to every formula as a rule, not an afterthought.
Counting columns from the sheet edge rather than from the table array's first column comes second. A table starting at column B shifts every index down by one, so a formula that worked yesterday returns the wrong field today. Recount from the block's left edge and label the index in a comment cell if two fields look alike.
The third is a lookup value that lives somewhere other than the leftmost column. VLOOKUP can only scan left-to-right, so an average solve either restructures the sheet or moves to INDEX-MATCH or XLOOKUP.
The fourth is reusing one formula across two tables with different structures. You can't. The index and the start column both change, so each table needs its own formula or a shared defined name.
The fifth is mistaking a visible value for the stored one. Dropdown items, imported text, and numbers formatted as currency all carry type information that doesn't appear on screen. Check one suspect row with =ISTEXT, =ISNUMBER, and =LEN() before blaming the function.
Realistic Failure Cases and How to Recover Fast
Picture a payroll workbook with employee IDs entered manually. Someone types " 1042" with a leading space. VLOOKUP throws #N/A, the user assumes the lookup is broken, retypes the formula five times, and loses an afternoon. A helper column with =TRIM(A2) in the source table fixes every future lookup, and the same edit cleans up IDs arriving from the HR system.
Another realistic scenario: two SKUs both read "A-100" on screen but one is text and one is a number. Both source tables were maintained by different departments. VLOOKUP matches only one, and half the rows return #N/A. The fix is standardising the key format at the point of entry, then confirming with a COUNTIF of the key against the list.
A third: the source price list was sorted descending by mistake, breaking approximate-match banding and occasionally returning off-by-one rates. Rebuilding the table in ascending order and adding a boundary test row catches it before the numbers go out. Sort the band column ascending, then test the exact threshold and the value just before it.
A fourth: someone inserts a column between the key and the price. Every downstream VLOOKUP with a typed index now points at the wrong field. The team sees clean-looking numbers in the wrong cells, and nobody notices until a board pack is wrong. Switching to header-matched INDEX-MATCH or a Table eliminates the failure mode.
Recovery for all four is the same. Isolate one row, check the key with =LEN(A2) and =ISTEXT(A2), compare against the source with Ctrl+F, and only then change the formula. This order keeps you from "fixing" the wrong layer.
Choosing Between VLOOKUP, INDEX-MATCH, XLOOKUP, and a Table
Pick VLOOKUP when the lookup key sits on the left, the return column sits to the right, and everyone opening the file has a version that supports it. It's still the most widely understood formula in business workbooks, and familiarity counts when colleagues inherit your file. For a modern Excel 365 build where the data layout may change, XLOOKUP wins on defaults and fails loudly on misses.
INDEX-MATCH is the safe compatibility choice across all Excel versions and any layout where the return column is to the left of the key. It's also the most likely thing a reviewer will recognise when auditing a workbook. Tables served through structured references are the better option for live data, because the lookup range grows with the list and survives header renames.
Use the Data Validation list with VLOOKUP to build a two-cell product picker: the user selects a product in A2, and C2 pulls the price. That combination feels like a tiny app and is almost free to maintain. If your table lives in a different workbook, open both files when the formula is first built; otherwise Excel stores the full path and will fail on the next machine.
If you inherit a workbook full of VLOOKUPs and don't have time to rebuild, at least drop IFNA around each one. That way every miss surfaces as a readable label rather than a grid of #N/A, and you can prioritise the actual data faults.
FAQ
Does VLOOKUP work to the left of the lookup column?
No. VLOOKUP only searches the leftmost column of the table array you give it, so it can never return a value from a column to the left of the key. To pull data leftward, use INDEX with MATCH, or switch to XLOOKUP in Excel 2021 or Microsoft 365. A quick restructure of the table so the key sits leftmost also works, and it's often faster than maintaining two lookup formulas.
Why does my VLOOKUP return #N/A when the value is visible on both sheets?
The most likely cause is a data type mismatch: one cell holds a number, the other holds the same digits stored as text. Trailing or leading spaces cause the same result and are invisible on screen. Check a single row with =ISTEXT(A2) and =LEN(A2), then TRIM or standardise the key column before changing the formula. If the values genuinely differ in format, use a helper column to convert them to a matching type.
Can I look up multiple criteria at once with VLOOKUP?
Not directly. Standard VLOOKUP takes one lookup value. The usual workaround is a helper column combining the criteria, such as =A2&"|"&B2, then a VLOOKUP against the same concatenation in the source table. That preserves backward compatibility with older Excel versions. In Microsoft 365, XLOOKUP or FILTER can handle the task without the helper column.
Is VLOOKUP slower than XLOOKUP on large datasets?
XLOOKUP is generally faster because it stops at the first match by default and doesn't scan the whole table array. VLOOKUP with a full-column reference can slow a large workbook noticeably during recalculation. On moderate workbooks the difference is small enough to ignore. If calculation time is a real problem, bound the reference range or pre-compute the results.
What does the fourth argument in VLOOKUP actually do?
It sets the match mode. FALSE or 0 returns an exact match; TRUE or 1 returns the nearest value at or below the lookup in a sorted ascending column. Omit it and Excel defaults to approximate match, which can produce a wrong number without any error message. For most business lookups, type FALSE every time and reserve TRUE for genuine band lookups.
Can VLOOKUP pull data from another workbook?
Yes, as long as both files are open when the formula is first built. Excel stores the full file path, so any teammate who hasn't saved the linked workbook to the same location will see #REF! or #N/A. Use defined names, keep both files in a shared folder, and open both before you save. A better long-term fix is moving the shared table into the same workbook or a Power Query connection.
Why does VLOOKUP return the wrong value without showing an error?
That's the hallmark of an approximate match against an unsorted first column. Excel chooses the nearest value it finds, which may be a neighbouring record, and reports no error. Add FALSE as the fourth argument and recheck the affected rows against the source data. If you genuinely need banded lookups, sort the threshold column ascending and test at each boundary value.