Why VLOOKUP still matters (and why it breaks)
If you have ever copied a price from one list into another by hand, row after row, you already know the problem VLOOKUP solves. A product list lives on one sheet, an order or an invoice lives on another, and the two have to be joined by a shared key: a SKU, an employee number, an invoice ID. Doing that by eye is slow, and it is exactly the kind of work where a tired person picks the row above the right one. One VLOOKUP formula does the join for you, and it does it the same way on row 5 as on row 5,000.
This free lesson is for anyone who uses Excel for real work: office staff who maintain price lists, accountants who match invoices against a supplier master, sales coordinators who fill order forms, analysts who combine two exports. You do not need to know any lookup function yet. By the end you will write an exact-match VLOOKUP with confidence, understand the four arguments, know why a missing FALSE can silently return the wrong number, and make your formula survive the day somebody inserts a column into the source table. That last point is the pitfall that breaks more spreadsheets than any other, and it is the reason this lesson is called VLOOKUP Exact Match and Its Pitfalls.
All examples use Ridgecrest Supply Co., a fictional distributor of tools and safety gear, the same company you work for in the lab above. Ridgecrest keeps a product list with eight SKUs in A2:E9 and receives order lines that only contain a SKU and a quantity. Your job is to fill in the product name, the unit price and the stock for each order line.
The core idea: search the first column, return a column to the right
VLOOKUP stands for vertical lookup. It looks down the first column of a table until it finds your value, then moves right along that row and returns whatever sits in the column you asked for. The syntax has four arguments:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
- lookup_value: what you are searching for, usually a cell reference such as
A12that holds a SKU. - table_array: the whole table, starting with the column that contains the keys, for example
$A$2:$E$9. VLOOKUP always searches the first column of this range. - col_index_num: which column of the table to return, counted from the first column of table_array, not from column A of the sheet. In
A2:E9, Product is 2, Category is 3, Unit price is 4 and Stock is 5. - range_lookup:
FALSE(or0) for an exact match,TRUE(or omitted) for an approximate match on a sorted list. For IDs, SKUs, names and codes you wantFALSE, every time.
The diagram below shows the two moves VLOOKUP makes for the first order line, SKU RC-2210: first it scans column 1 from top to bottom and stops at the first row that matches, then it walks across that row to column 4 and hands back the unit price.
Three behaviours are worth memorising now, because they explain most surprises later. First, VLOOKUP returns the first match it finds; if a SKU appears twice, the second row is never reached. Second, the exact match is not case-sensitive, so rc-1180 finds RC-1180. Third, if nothing matches, an exact-match VLOOKUP returns #N/A, which is actually helpful: it tells you that a key is missing instead of guessing.
Why FALSE is not optional
The fourth argument looks optional, and Excel lets you leave it out. But when you leave it out, Excel assumes TRUE, which means approximate match. Approximate match is designed for sorted threshold tables, such as discount tiers or tax brackets, where you want "the largest value that is less than or equal to my number". On an unsorted list of SKUs, it does not look for your SKU at all in the way you expect. It uses a fast search that assumes the first column is sorted ascending and can stop on a neighbouring row. The result is a plausible-looking price that belongs to a different product, and no error message warns you.
That is why the safe habit is to type FALSE (or 0, which means the same) as the last argument whenever the key is an identifier. You will use approximate match deliberately in lesson 2 of this course, for discount tiers and shipping bands, where the table is sorted on purpose and the behaviour is exactly what you want.
Worked example: filling Ridgecrest's order lines
Ridgecrest's product list sits in A1:E9 with the headers SKU, Product, Category, Unit price and Stock. Five order lines arrive in rows 12 to 16 with a SKU and a quantity. Notice that the second order line was typed in lower case. The table shows what each formula returns once you have copied it down; the formulas are written for row 12 and adjust automatically for the rows below.
| Row | SKU (A) | Product (B) | Qty (C) | Unit price (D) | Stock (E) | Line value (Qty x price) |
|---|---|---|---|---|---|---|
| 12 | RC-2210 | Angle grinder 125 mm | 4 | 89.90 | 31 | 359.60 |
| 13 | rc-1180 | Tape measure 8 m | 12 | 12.40 | 175 | 148.80 |
| 14 | RC-3410 | Work gloves, leather | 50 | 8.75 | 320 | 437.50 |
| 15 | RC-1015 | Claw hammer 16 oz | 6 | 18.50 | 210 | 111.00 |
| 16 | RC-3302 | Safety glasses, clear | 100 | 6.20 | 540 | 620.00 |
The three formulas for row 12 are:
- Product in B12:
=VLOOKUP(A12,$A$2:$E$9,2,FALSE)returns Angle grinder 125 mm. - Unit price in D12:
=VLOOKUP(A12,$A$2:$E$9,4,FALSE)returns 89.90. - Stock in E12:
=VLOOKUP(A12,$A$2:$E$9,MATCH(E$11,$A$1:$E$1,0),FALSE)returns 31. HereMATCHlooks up the header text "Stock" in E11 inside the header row and returns its position, 5.
The dollar signs matter. $A$2:$E$9 is an absolute reference, so the table stays put when you copy the formula from row 12 down to row 16. A12 has no dollar signs, so it becomes A13, A14 and so on. In the stock formula, E$11 locks only the row: if you copied the formula one column to the left, it would read the header in D11 instead, which is exactly what you want from a header-driven lookup.
Row 13 proves the case rule: rc-1180 in lower case still returns Tape measure 8 m and 12.40, because VLOOKUP compares text without regard to upper or lower case. Once the prices are in, a simple =C12*D12 gives the line value, and the chart below compares the five lines. A chart like this is only trustworthy if every looked-up price is right, which is why the exact-match habit is worth so much.
Step by step: writing the lookup in Excel
- Click the first result cell, here
B12, and type=VLOOKUP(. Excel shows the argument tooltip under the cell; the bold argument is the one you are typing now. - Click
A12for the lookup value and type a comma. - Select the table
A2:E9with the mouse, then press F4 once to turn it into$A$2:$E$9. On a Mac, use Cmd+T or fn+F4, depending on your keyboard settings. Type a comma. - Type the column number,
2for Product, and a comma. - Type
FALSE(or pick FALSE - Exact match from the list Excel offers), close the bracket and press Enter. - Copy the formula down: double-click the fill handle (the small square at the bottom-right of the cell), or select
B12:B16and press Ctrl+D. - Repeat for the unit price with column number
4. For the stock, replace the number withMATCH(E$11,$A$1:$E$1,0)so the column is found by its header. - Check the result: press Ctrl+` (grave accent) to show formulas instead of values, or use Formulas > Evaluate Formula to step through one lookup and see each argument being resolved.
=VLOOKUP(A12,Products,2,FALSE). A table grows automatically when you add a ninth or tenth product, so the lookup range never needs to be edited.The biggest pitfall: the hard-coded column number
The number 4 in =VLOOKUP(A12,$A$2:$E$9,4,FALSE) means "the fourth column of the table". It does not mean "the column called Unit price". As long as nobody touches the table, that is the same thing. But tables change. Someone in purchasing decides that Ridgecrest needs a Brand column next to the product name and inserts it between Product and Category. Excel is clever enough to stretch your range from $A$2:$E$9 to $A$2:$F$9, but it does not change the 4. Column 4 of the new table is Category, so every unit-price cell now shows text like Power tools, and every line-value formula that multiplies by it returns #VALUE!. In a worse case, the new column holds numbers and the wrong figures flow silently into a total.
The cure is to stop typing the number and let Excel find it. MATCH(lookup_value, lookup_array, 0) returns the position of a value in a single row or column, with 0 meaning exact match. MATCH("Unit price",$A$1:$E$1,0) returns 4 today. After the Brand column is inserted, the header range expands to $A$1:$F$1 and the same MATCH returns 5, so the VLOOKUP keeps returning the unit price. In the lab you take this one step further and point MATCH at the header of the result table (E$11), so the formula reads which column it should fill from its own heading.
The last task of the lab asks you to count the new column number by hand. Doing it once by hand is the best way to understand why you never want to do it again.
Common mistakes and how to spot them
- Missing FALSE. Symptom: plausible but wrong values, no error. Check: click the cell and look for
FALSEor0as the fourth argument. A quick audit is Ctrl+F with Look in: Formulas for,TRUE)or for VLOOKUPs that end in)right after the column number. - Table not locked. Symptom: the first rows work, lower rows return
#N/Abecause the range slid down past the data. Check: the range should read$A$2:$E$9in every copied cell. Fix it with F4. - Counting columns from the sheet instead of the table. If your table starts in column C, Product might be column 2 of the table even though it sits in column D of the sheet. Always count from the first column of table_array.
- Hidden spaces. Symptom:
#N/Aalthough the SKU is clearly in the list. Check with=LEN(A12): RC-2210 has 7 characters, so 8 means a trailing space. Clean it withTRIM, or look it up asTRIM(A12). - Numbers stored as text. Symptom:
#N/Afor numeric IDs such as 10452. One side is a number, the other is text that looks the same. A small green triangle in the cell corner is the clue. Convert with Data > Text to Columns > Finish or withVALUE. - Duplicate keys. VLOOKUP returns only the first match. Check a key list with
=COUNTIF($A$2:$A$9,A2); anything above 1 is a duplicate that needs a decision. - Hiding every error with IFERROR.
=IFERROR(VLOOKUP(...),0)turns a mistyped SKU into a price of zero, which is worse than an error. PreferIFNAwith a clear message such as "SKU not found", and only after you know why the key is missing.
When to use XLOOKUP or INDEX/MATCH instead
VLOOKUP has two structural limits. It can only search the first column of the table and only return columns to its right, and it depends on a column number. If your Excel has XLOOKUP (Microsoft 365 and Excel 2021 or later), =XLOOKUP(A12,$A$2:$A$9,$D$2:$D$9) does the same job with a separate lookup range and return range, defaults to an exact match and has a built-in if not found argument. INDEX/MATCH works in every version: =INDEX($D$2:$D$9,MATCH(A12,$A$2:$A$9,0)). Both survive inserted columns and both can look to the left. You will build each of them later in this course, but VLOOKUP is still everywhere in shared workbooks, so reading and repairing it is a skill you need either way.

Quick reference: functions and shortcuts from this lesson
| Function or key | What it does | Example |
|---|---|---|
VLOOKUP | Finds a key in the first column of a table and returns a value from the same row | =VLOOKUP(A12,$A$2:$E$9,2,FALSE) |
MATCH | Returns the position of a value in a row or column; 0 = exact match | =MATCH("Stock",$A$1:$E$1,0) returns 5 |
XLOOKUP | Modern lookup with separate lookup and return ranges (365 / 2021+) | =XLOOKUP(A12,$A$2:$A$9,$D$2:$D$9) |
INDEX | Returns the value at a given position of a range | =INDEX($D$2:$D$9,4) returns 89.90 |
IFNA | Replaces only #N/A with your own result | =IFNA(VLOOKUP(A12,$A$2:$E$9,2,FALSE),"SKU not found") |
TRIM / LEN | Remove extra spaces / count characters to find hidden spaces | =LEN(A12) |
| F4 | Cycles a reference through $A$2, A$2, $A2, A2 | Lock the table range |
| Ctrl+D | Fills the top cell's formula down the selection | Select B12:B16, Ctrl+D |
| Ctrl+` | Toggles between values and formulas | Audit a column of lookups |
Real-world uses
- Order and invoice entry: type a SKU and let VLOOKUP fill the description, price and VAT category from the product master, exactly as in the lab.
- Payroll and HR lists: pull an employee's department, cost centre or hourly rate from a staff list by employee number before you calculate wages.
- Reconciling two exports: look up each invoice number from the bank export in the accounting export; every
#N/Ais a payment that is missing on one side and needs a closer look. - Stock checks: compare the quantity on an order with the looked-up stock and flag lines that cannot be delivered, for example with
=IF(C12>E12,"Back order","OK"). - Repairing inherited workbooks: when a colleague's report suddenly shows category names in a price column, you now know to look for a hard-coded column number and replace it with MATCH.
What you will build in the rest of this course
The seven paid lessons stay with Ridgecrest Supply Co. and turn this one formula into a complete lookup toolkit. Each lab is a real spreadsheet task with instant checks on every cell.
Approximate Match: Discount Tiers and Shipping Bands. You use the other half of VLOOKUP on purpose: sorted threshold tables that give each order its volume discount, net value, tier name and a weight-based shipping fee. You will see exactly why sorting matters and how to build tier tables that cannot be misread.
XLOOKUP: If Not Found, Match Modes and Last-to-First Search. You read a price-change log and return the first and the latest price per SKU, the date of the last change and a friendly message for SKUs without a record, all with one modern function.
INDEX/MATCH and Left Lookups. You split a lookup into its two parts, find a position with MATCH and return it with INDEX, then return a supplier name that sits to the left of the ID, something VLOOKUP simply cannot do.
Two-Way Lookups: INDEX/MATCH/MATCH and Nested XLOOKUP. You pull a single number from a region by month sales matrix in two different ways, build a row that follows a selected region and chart it.
Multiple-Criteria Lookups: Helper Keys vs MATCH(1,(…)*(…),0). You look up contract prices where only the pair customer plus product is unique, and solve it three ways so you can choose the right one for any workbook.
Wildcards & Partial Matches: *, ? and ~. You build a small search box for the catalogue that finds the first product containing a word, counts the matches and handles literal asterisks and question marks.
Mid-course Project: A Lookup-Driven Sales Report with Error Handling. You bring everything together in a category revenue report built from raw order lines, with clean handling of mistyped SKUs, a SUMIFS summary and a chart that a manager can read at a glance.
Summary
VLOOKUP searches the first column of a table and returns a value from a column to its right. For identifiers, always end it with FALSE, lock the table with $, and remember that the match ignores case and returns the first hit only. The column number is the weak spot: replace it with MATCH on the header and your formula survives inserted columns. Now scroll up to the lab, fill Ridgecrest's five order lines and let the Coach check every cell. It takes about fifteen minutes, and it is the fastest way to make these rules stick.
Frequently asked questions
What does FALSE mean at the end of a VLOOKUP?
FALSE (or 0) tells VLOOKUP to look for an exact match only. Without it, Excel uses approximate match, which assumes a sorted first column and can return a value from the wrong row.
Why does my VLOOKUP return #N/A when the value is in the list?
The two values are not exactly identical. The usual causes are extra spaces, a number stored as text on one side, or a lookup range that slid when the formula was copied because it was not locked with $.
Is VLOOKUP case-sensitive?
No. VLOOKUP treats upper and lower case as the same, so rc-1180 finds RC-1180. For a case-sensitive lookup you need a formula with EXACT, for example inside INDEX/MATCH.
How do I stop VLOOKUP from breaking when a column is inserted?
Replace the typed column number with MATCH on the header row, for example =VLOOKUP(A12,$A$2:$E$9,MATCH("Stock",$A$1:$E$1,0),FALSE). MATCH finds the column again after the table changes. XLOOKUP and INDEX/MATCH avoid the problem altogether.
Can VLOOKUP look to the left?
No. VLOOKUP only searches the first column of the table and returns columns to its right. Use INDEX/MATCH or XLOOKUP when the value you need sits to the left of the key.
Should I use VLOOKUP or XLOOKUP?
If everyone who opens the file has Microsoft 365 or Excel 2021 or later, XLOOKUP is simpler and safer. VLOOKUP still works in every version and appears in most shared workbooks, so it is worth knowing well.
Keep going: Excel Lookup Masterclass: XLOOKUP, INDEX/MATCH, VLOOKUP & Two-Way Lookups
This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time $9.90.
- Approximate Match: Discount Tiers and Shipping Bands
- XLOOKUP: If Not Found, Match Modes and Last-to-First Search
- INDEX/MATCH and Left Lookups
- Two-Way Lookups: INDEX/MATCH/MATCH and Nested XLOOKUP
- Multiple-Criteria Lookups: Helper Keys vs MATCH(1,(…)*(…),0)
- Wildcards & Partial Matches: *, ? and ~
- Mid-course Project: A Lookup-Driven Sales Report with Error Handling
- Horizontal Tables: HLOOKUP and XLOOKUP Across a Row
- Next Larger and Closest Match: Picking the Right Box
- Why Lookups Fail: Spaces, Non-Breaking Spaces and Look-Alike Characters
- Key Quality: Duplicate Keys That Make Lookups Lie
- Fallback Lookups: A Second Table When the First One Misses
- Chained Lookups: Customer to Branch to Region, with a Chart
- Effective-Dated Lookups: The Price Valid on the Order Date
- Approximate Two-Way Lookups: Exchange Rates by Date and Currency
- Whole-Row Lookups: Period Totals with XLOOKUP, TAKE and DROP
- One-to-Many Lookups: All Matches with FILTER, TEXTJOIN and the n-th Match
- Lookups by Rank: Top Sellers, Ties and a Top-5 Chart
- Final Project: Customer Account Lookup Dashboard