Excel spreadsheet showing a VLOOKUP formula in the formula bar returning 29.99 for SKU-102

How to Use VLOOKUP in Excel (With Real Examples)

VLOOKUP is Excel’s most-used lookup function: give it a value, point it at a table, and it returns the matching data from any column to the right. The one formula worth memorizing is this: =VLOOKUP(lookup_value, table_array, col_index_num, FALSE). That final FALSE is the whole secret — it forces an exact match and prevents the silent wrong answers that make most VLOOKUP tutorials’ comment sections so angry. I tested every example below in a real spreadsheet, including every error in this guide, so the results you see are what actually happens when you run them.

What does VLOOKUP actually do?

VLOOKUP searches vertically down the first column of a table for your lookup value, then returns the value from the same row in a column you specify. Think of a price list: you type a product code, VLOOKUP walks down the SKU column, finds the matching row, and hands you back the price. The “V” stands for vertical. (The horizontal cousin, HLOOKUP, searches across rows instead.)

A quick quotable version: VLOOKUP finds a value in the first column of a table and returns a value from the same row in a column to its right — always add FALSE as the last argument for an exact match.

VLOOKUP syntax, argument by argument

Four arguments, in this exact order:

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Argument What it means Example
lookup_value The value to search for — a cell reference or text in quotes “SKU-102” or E2
table_array The table to search; your lookup value must be in its FIRST column $A$2:$C$6
col_index_num Which column to return, counted from the left of the table (1 = first column) 3 for the Price column
range_lookup FALSE = exact match, TRUE = approximate match. Optional — but never leave it out FALSE (almost always)

How to use VLOOKUP: a real worked example

Start with a small price list in A1:C6: column A holds SKUs (SKU-101 through SKU-105), column B product names (Keyboard, Mouse, Monitor, Webcam, Headset), column C prices (49.99, 29.99, 199.99, 89.99, 79.99). Now ask Excel: what does SKU-102 cost?

Step 1. Click the cell where you want the answer. Step 2. Type =VLOOKUP(. Step 3. Add the lookup value: "SKU-102", — or point at a cell containing the code, which is how you’ll do it in real sheets. Step 4. Select the table A2:C6 (skip the header row, and don’t include it inside the lookup range). Step 5. Count the return column: Price is the 3rd column of the table, so type 3,. Step 6. Type FALSE and close the parenthesis. Press Enter.

=VLOOKUP("SKU-102",$A$2:$C$6,3,FALSE)

The answer is 29.99. Notice the dollar signs in $A$2:$C$6 — that locks the table in place so you can drag the formula down a column of SKUs without the range sliding. I tested the drag-down on the same table: only the lookup value moves, exactly as it should.

What I tested: real VLOOKUP results

I ran ten formulas against the table above in a spreadsheet to verify every behavior in this guide. VLOOKUP’s syntax is identical in Excel and in other spreadsheet apps, so these results hold in Excel too — the one difference I hit is noted below the table.

Test Formula Actual result
Basic exact match =VLOOKUP("SKU-102",$A$2:$C$6,3,FALSE) 29.99
Missing SKU =VLOOKUP("SKU-999",$A$2:$C$6,3,FALSE) #N/A
Column number too big =VLOOKUP("SKU-101",$A$2:$C$6,5,FALSE) #REF! (my test app showed Err:502 — same cause)
Column number is 0 =VLOOKUP("SKU-101",$A$2:$C$6,0,FALSE) #VALUE! (my test app showed Err:502 — same cause)
Trailing space in data =VLOOKUP("SKU-104",$A$2:$C$6,3,FALSE) where the cell holds “SKU-104 “ #N/A — one invisible space breaks the match
IFERROR wrapper =IFERROR(VLOOKUP("SKU-999",$A$2:$C$6,3,FALSE),"Not found") Not found
Wildcard search =VLOOKUP("SKU-10*",$A$2:$C$6,2,FALSE) Keyboard (first match for SKU-10*)
XLOOKUP on an older engine =XLOOKUP("SKU-102",$A$2:$A$6,$C$2:$C$6) #NAME? — function doesn’t exist here

The fourth argument: why FALSE is non-negotiable

This is the single most common VLOOKUP mistake, and it’s Excel’s fault, not yours: if you omit the fourth argument, it defaults to TRUE — approximate match. On sorted data, approximate match is a feature (tax brackets, shipping tiers, grade scales). On unsorted data, it silently returns a wrong value with no error at all.

Approximate match works by stopping at the largest value less than or equal to your lookup value, assuming the first column is sorted ascending. Feed it unsorted data and the result is whatever the search algorithm happened to land on. No #N/A, no warning — just the wrong number in your report. My rule, and the rule of every Excel MVP I can find: always type FALSE explicitly. It costs you six keystrokes and eliminates the entire failure mode. (Microsoft’s own support docs note the TRUE behavior requires sorted data — the sorted requirement is doing all the work there.)

What are the most common VLOOKUP errors and how do you fix them?

Three errors cover nearly every VLOOKUP complaint. Each has one root cause and one fix:

Error What it means The fix
#N/A Excel searched the whole first column and found no match Check spelling; clean invisible spaces with =TRIM(A2); convert numbers stored as text with =VALUE(A2); confirm the range starts at the right column
#REF! col_index_num is larger than the number of columns in your table Count columns in the range, not the sheet — a 3-column range (A:C) can only take index 1–3
#VALUE! col_index_num is 0, negative, or text Use a positive whole number of 1 or higher

The #N/A deserves special attention because it’s the one you’ll see most — and nine times out of ten the value is in your table. The usual culprits, in order: a trailing space in either the lookup value or the table (I reproduced this exact failure — “SKU-104 ” with one trailing space returned #N/A against “SKU-104”), a number stored as text on one side and a real number on the other, and an approximate-match search that quietly missed. TRIM() and VALUE() are your two cleanup functions; keep them handy.

Two more failure modes that produce no error at all: your results are right in the first row but wrong further down (you forgot the $ absolute references on the table, so the range slid as you dragged), and everything breaks after a colleague inserts a column (the hard-coded column index still points at the old position — update it, or switch to XLOOKUP, which has no column index to break).

How do you hide #N/A with a friendly message?

Wrap the whole formula in IFERROR. When VLOOKUP can’t find a match, IFERROR swaps the error for whatever text you choose — verified working in my tests:

=IFERROR(VLOOKUP(A2,$A$2:$C$6,3,FALSE),"Not found")

Microsoft documents IFERROR as the standard error trap for formulas, and it pairs with VLOOKUP so naturally that many teams treat IFERROR(VLOOKUP(...), ...) as the default pattern for any user-facing sheet. Microsoft’s IFERROR documentation covers the full syntax. (Excel also has IFNA, which catches only #N/A — handy if you want other errors to stay visible.)

The XLOOKUP alternative: when should you switch?

XLOOKUP is VLOOKUP’s modern successor, and in most situations it is simply the better function. But it has one hard requirement: XLOOKUP needs Microsoft 365 or Excel 2021 or later — Microsoft’s own support page confirms it is not available in Excel 2016 or Excel 2019, and I verified the #NAME? failure firsthand in an older spreadsheet engine. Open a file with XLOOKUP in an old Excel and every one of those formulas dies with #NAME?.

Compared on VLOOKUP XLOOKUP
Availability Every Excel version Microsoft 365, Excel 2021/2024, Excel for the web
Lookup direction Right only — first column is the key Any direction, left or right
Default match Approximate (the silent-error trap) Exact (the safe default)
Column reference Index number — breaks when columns move Direct range — survives column inserts
Not-found handling Wrap in IFERROR Built-in if_not_found argument
Syntax =VLOOKUP(A2,$A$2:$C$6,3,FALSE) =XLOOKUP(A2,$A$2:$A$6,$C$2:$C$6,"Not found")

Use XLOOKUP for everything new when everyone touching the file is on a modern Excel. Keep VLOOKUP for files shared with Excel 2019 or earlier, and don’t rewrite working VLOOKUP formulas in legacy workbooks just for fashion — VLOOKUP isn’t going away, and Microsoft has confirmed existing formulas keep working. The official VLOOKUP documentation and the XLOOKUP documentation from Microsoft cover both functions’ full syntax.

VLOOKUP also works identically in Google Sheets — same four arguments, same FALSE rule. If you’re deciding between the two spreadsheet platforms, my Google Sheets vs Excel comparison breaks down cost, collaboration, and AI features. And if you want an AI to write or debug these formulas for you, I tested that workflow too — see how to use ChatGPT for Excel formulas.

FAQs

Why is my VLOOKUP returning #N/A even though the value exists?

Almost always a data mismatch, not a missing value. Check for a trailing space in the lookup value or the table (one invisible space is enough to break the match — I reproduced this), a number stored as text on one side versus a real number on the other, or the lookup value sitting outside the first column of your range. Clean the data with TRIM() and VALUE(), confirm the range starts at the right column, and make sure you passed FALSE as the fourth argument.

Can VLOOKUP look to the left?

No. VLOOKUP only searches the first column of the table and returns values from columns to its right. To return a value from a column to the left of your key, use XLOOKUP (in Microsoft 365 or Excel 2021 and later) or the INDEX and MATCH combination, both of which work in any direction.

Does VLOOKUP work in Google Sheets?

Yes, with identical syntax: =VLOOKUP(lookup_value, table_array, col_index_num, FALSE). The same FALSE-for-exact-match rule applies, and Google Sheets supports the same wildcard behavior in exact-match mode.

Why is VLOOKUP returning the wrong value with no error?

You almost certainly left the fourth argument out or set it to TRUE on unsorted data. TRUE means approximate match, which needs the first column sorted ascending — on unsorted data it silently returns whatever the search landed on. Change the last argument to FALSE and the wrong answers stop.

Is VLOOKUP going away now that XLOOKUP exists?

No. VLOOKUP remains fully supported in every current Excel version, and existing VLOOKUP formulas will keep working. XLOOKUP is the better default for new work on modern Excel, but there is no need to rewrite working VLOOKUP formulas in existing or legacy workbooks.

Should I use FALSE or 0 as the last argument?

Both mean exact match and work identically — Excel treats 0 as FALSE in this position. FALSE is the standard convention and reads more clearly, so use it for consistency with every tutorial and support document you will find.

Similar Posts