VLOOKUP in Excel for Beginners: Exact Match, Table Setup and the #N/A Fix

VLOOKUP exact match in Excel: a lookup table with the column index highlighted

VLOOKUP is the function that makes people feel like they know Excel, and the one that quietly breaks their reports when a column gets inserted. It searches for a value down the first column of a table and returns a value from another column in the same row. Used the way it was designed, with an exact match on a stable table, it is reliable. Used casually, with the fourth argument missing, it returns wrong numbers that look right, which is worse than an error.

This guide builds VLOOKUP the way it should be built the first time: a clean lookup table, an exact match, locked references, and the three errors you will actually meet.

The syntax, argument by argument

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

The lookup value is what you are searching for: an ID, a name, a code. The table array is the range that holds the lookup table, and its first column is the only column VLOOKUP can search. The column index is a counting number: 1 is the first column of the table array, 2 the second, and so on. The last argument is the one everyone forgets: FALSE means exact match, TRUE means approximate match, and leaving it empty means TRUE, which is almost never what you want.

A worked example on a price list

Imagine a product table in A2:C8: SKU in column A, product name in B, unit price in C. On an invoice row, the SKU is typed in E2 and you want the price. The formula is =VLOOKUP(E2, $A$2:$C$8, 3, FALSE) and it returns the price for that exact SKU. The dollar signs matter if you drag the formula down an invoice: without them, the table range slides down with each row and the lookup starts missing products. That locking behaviour is the same mechanism explained in what the $ sign actually locks in Excel references, and it is worth five minutes if the signs still feel arbitrary.

SKU (E2)FormulaReturns
P-104=VLOOKUP(E2,$A$2:$C$8,3,FALSE)Price of P-104
p-104 (lowercase)sameSame price; VLOOKUP ignores letter case
P-999 (not in table)same#N/A
P-104=VLOOKUP(E2,$A$2:$C$8,3,TRUE)Usually right, wrong by design on unsorted data

Why approximate match is a trap on unsorted data

With TRUE or an empty fourth argument, VLOOKUP assumes the first column is sorted ascending and performs a binary search: it finds the largest value less than or equal to your lookup value. On an unsorted list it can land anywhere and return a neighbouring row's price with no warning. Approximate match has exactly one legitimate everyday use: banded thresholds like tax brackets, commission tiers or grades, where the table is sorted and you want the bracket, not an exact hit. Everywhere else, type FALSE. Make it a habit like saving.

The three errors you will actually meet

#N/A means the value was not found in the first column. Check for trailing spaces first, because "P-104 " with a space is not "P-104"; wrap the lookup value in TRIM or clean the table. Check also that numbers are not stored as text in one place and real numbers in the other, since VLOOKUP treats them as different values. #REF! means the column index points past the table, which happens when someone deletes a column inside the table array and the hard-coded 3 now overruns the range. #VALUE! means the column index was less than 1, which is rare but appears when the index is computed by another formula.

The leftward limitation and its fixes

VLOOKUP can only look to the right: the searched column must be the first column of the table array, and the returned column must be to its right. If your ID sits in column C and you need the name from column A, VLOOKUP alone cannot do it. The classic answer is INDEX with MATCH, which looks up in any direction; the modern answer is XLOOKUP, which also defaults to exact match and survives inserted columns. The trade-offs are laid out in XLOOKUP vs VLOOKUP: which to use where and in the INDEX and MATCH lookup that works in both directions. If your file must open in Excel 2016 or older, VLOOKUP and INDEX MATCH are your only options, which is reason enough to learn this function properly.

Two habits that prevent most VLOOKUP disasters

First, build lookup tables in their own columns with the key on the left and never insert a column inside the table array; add new data at the right or bottom instead. Second, wrap the formula once you trust it: =IFERROR(VLOOKUP(E2,$A$2:$C$8,3,FALSE),"not found") turns a broken invoice line into a readable message while you fix the underlying data. IFERROR hides every error type, though, so only add it after the plain version returns the right answers.

A one-minute check before you trust the result

  • Is the fourth argument FALSE, typed out, not assumed?
  • Is the table range locked with dollar signs before dragging?
  • Is the lookup value free of extra spaces and stored in the same type as the table's first column?
  • Does the column index still match after any column inserts?
  • Does at least one known value return the answer you can verify by eye?

Learn VLOOKUP with FALSE, locked ranges and a clean table, and it will serve you for years, especially in files you share with people on older Excel. Then learn its successors, and pick per file rather than per habit.

Source: Microsoft Support — VLOOKUP function

Common mistakes with VLOOKUP

The column index counts from the lookup column, not from column A. If the table starts in column B and the name you want sits in column D, the index is 3, not 4. Count the columns inside the table you selected, and you will stop getting the neighbouring column back.

Locking the table but not the index. =VLOOKUP($A2,$B$2:$D$500,2,FALSE) copies down safely. Drop the dollar signs and the table slides one row per copy, and the last rows return #N/A for no visible reason.

Trailing spaces that you cannot see. A name imported from another system often ends in a space. VLOOKUP treats "Sara" and "Sara " as two different people. Wrap the lookup value in TRIM() before you blame the formula.

Table starts inYou want the columncol_index_num
BB (the lookup column)1
BD3
BF5

Frequently asked questions

Why does VLOOKUP return the wrong name for a few rows? Almost always the fourth argument. If it is TRUE or missing, Excel finds the closest match below your value instead of the exact one. Set it to FALSE, or to 0, on every lookup you write by hand.

Can VLOOKUP look to the left? No. It only reads to the right of the lookup column. Use INDEX with MATCH, or XLOOKUP in Microsoft 365, and the direction stops mattering.

Why does it fail on numbers that look identical? One side is stored as text and the other as a number. The two are never equal. Convert the column with the green triangle warning, or multiply it by one, and the lookup starts working.

Get new guides by email
One short email when a new guide is published. No spam, and you can leave anytime.
Your address is only used for these emails.

Last updated: 5 December 2026

Comments

Popular posts from this blog

Learn to Code From Zero: A 90-Day Plan That Survives a Full-Time Job

How to Read Your Payslip: Gross, Net, Tax Codes and the YTD Column

iPhone Storage Full? What to Delete First (And What Never to Touch)