VLOOKUP

Look up a value in the first column of a table and return a value in the same row from another column.

Lookup & ReferenceBeginner
Purpose
Searches the first column of a range for a value and returns a result from the same row in a column you specify.
Returns
A value from any column in your table
Syntax
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Excel version
Excel 2003 and later

How VLOOKUP works

VLOOKUP searches the first column of a table from top to bottom, finds a match, then moves right to return a value from whichever column you specify.

Think of it like a phone book. You search by name (first column), then read across to get the phone number (your chosen column). VLOOKUP does this in milliseconds across thousands of rows.

The catch, and this trips up most people, is that VLOOKUP can only look to the right. Your lookup value must always be in the first column of your selected range. If your data is not structured this way, you need INDEX MATCH instead.

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

Arguments

ArgumentTypeRequiredDescription
lookup_valueany✓ RequiredThe value you want to find. Usually a cell reference like A2. Can be text, a number, or a cell reference.
table_arrayrange✓ RequiredThe range containing your data. VLOOKUP searches the first column of this range. Lock it with $ signs if you plan to copy the formula down.
col_index_numnumber✓ RequiredWhich column to return, counted from the left of your table_array. Column 1 is the first column (the one being searched), column 2 is the next, and so on.
range_lookupboolean✗ OptionalFALSE for exact match (almost always what you want). TRUE for approximate match. Only use this for sorted tables like commission tiers or tax brackets.

VLOOKUP basic: find product price by code

You work in sales at TechDirect. A customer wants the price of product P-1042. Your catalog has 500 rows. One formula finds it instantly.

=VLOOKUP(G2,$A$1:$D$9,4,FALSE)
  • G2 the product code you're looking up
  • $A$1:$D$9 your product catalog (locked with $)
  • 4 return column 4 (the Price column)
  • FALSE exact match only
H2
fx
=VLOOKUP(G2,$A$1:$D$9,4,FALSE)
ABCDEFGHI
1Product CodeProduct NameCategoryPriceOrderProduct CodePrice
2P-1001Wireless MousePeripherals$29.99PO-2024-001P-1042$349.99
3P-1015Mechanical KeyboardPeripherals$89.99PO-2024-002P-1156$129.99↓ drag down
4P-104227" MonitorDisplays$349.99PO-2024-003P-1001$29.99
5P-1088USB-C HubAccessories$44.99
6P-1103Laptop StandAccessories$67.99
7P-1156Webcam HDPeripherals$129.99
8P-1201Desk Lamp LEDLighting$39.99
9P-1247Cable ManagerAccessories$14.99
Formula entered in cell H2, highlighted in green on the right.
Row 4 highlighted in yellow. That's where VLOOKUP found P-1042. It returned $349.99 from column 4.

VLOOKUP with IFERROR: handle missing values gracefully

Your lookup formula works perfectly until someone types an invalid product code. VLOOKUP returns #N/A and your report looks broken. Wrap every VLOOKUP in IFERROR. Every single one. No exceptions.

=IFERROR(VLOOKUP(E2,$A$2:$B$8,2,FALSE),"Not found")
  • E2 the order's product code (the value being looked up)
  • $A$2:$B$8 the catalog: codes in column A, prices in column B
  • If the code is found returns the matching price
  • If the code is missing returns "Not found" instead of #N/A
F2
fx
=IFERROR(VLOOKUP(E2,$A$2:$B$8,2,FALSE),"Not found")
ABCDEFG
1CodePriceOrderCodePrice
2P-1001$29.99PO-001P-1042$349.99
3P-1042$349.99PO-002P-9999Not found↓ drag down
4P-1156$129.99PO-003P-1001$29.99
5P-2024$44.99PO-004P-0000Not found
6P-1088$19.99
7P-1450$79.99
8P-2107$14.99
9
Formula entered in cell F2. IFERROR catches missing codes and returns 'Not found' instead of #N/A.
Catalog on the left, orders on the right. PO-002 and PO-004 reference codes that don't exist in the catalog. Without IFERROR those cells would show #N/A. With IFERROR they show 'Not found' so the report stays clean.
Every VLOOKUP you write at work should have IFERROR wrapped around it. A formula that crashes when data is missing is not a production-ready formula.

VLOOKUP across sheets: pulling data from another tab

Your employee list is on Sheet1. Salaries live on Sheet2 to keep them restricted. You need to pull each person's salary without combining the sheets.

=VLOOKUP(A2,Sheet2!A:E,2,FALSE)
  • A2 the employee ID on Sheet1
  • Sheet2!A:E the compensation table on Sheet2 (the Sheet2! prefix points to the other tab)
  • 2 return column 2 of Sheet2 (the Salary column)
  • FALSE exact match: IDs must match exactly
Sheet1: Employee Roster (your working sheet)
G2
fx
=VLOOKUP(A2,Sheet2!A:E,2,FALSE)
ABCDEFGH
1Employee IDNameDepartmentTitleHire DateManagerSalary
2E-1001Sarah ChenFinanceSenior Analyst2019-03-15Mark Lee$72,000
3E-1042James MillerHRHR Specialist2020-06-22Anna Park$61,000↓ drag down
4E-1088Maria SantosMarketingMarketing Lead2018-11-04Tom Davis$58,000
5E-1103David BrownFinanceJunior Analyst2021-08-12Mark Lee$68,000
6E-1156Emma DavisITSystems Engineer2017-02-28Tom Davis$91,000
7E-1201Alex KimSalesAccount Manager2022-01-10Lisa Wong$64,000
8E-1245Rachel WoodEngineeringSoftware Engineer2020-09-15Mike Chen$85,000
9E-1287Carlos GomezOperationsOps Manager2019-12-01Anna Park$76,000
10E-1310Jenny LiuMarketingContent Writer2023-04-18Tom Davis$52,000
11E-1356Mark ReillyEngineeringSenior Engineer2018-07-25Mike Chen$98,000
12
13
14
Formula entered in cell G2. Pulls Sarah Chen's $72,000 salary from Sheet2.
Sheet1
Sheet2
Sheet2: Compensation table (referenced by Sheet1)
A1
fx
ABCDE
1Employee IDSalaryBonusStockTotal Comp
2E-1001$72,000$5,000$8,000$85,000
3E-1042$61,000$3,500$5,000$69,500
4E-1088$58,000$3,000$4,500$65,500
5E-1103$68,000$4,500$7,000$79,500
6E-1156$91,000$7,000$12,000$110,000
7E-1201$64,000$4,000$6,000$74,000
8E-1245$85,000$6,500$10,000$101,500
9E-1287$76,000$5,500$8,500$90,000
10E-1310$52,000$2,500$3,000$57,500
11E-1356$98,000$8,000$13,500$119,500
Sheet1
Sheet2

Sheet1 D2 looks up E-1001 on Sheet2 and pulls back $72,000. The Sheet2! prefix tells VLOOKUP exactly which tab to search. The rest of the formula works identically to a same-sheet lookup.

VLOOKUP with TRUE: the one time approximate match makes sense

Commission tiers. Tax brackets. Grade scales. These are the only real cases where VLOOKUP with TRUE makes sense, where you want to find which range a value falls into, not an exact match.

Critical requirement: your lookup table must be sorted in ascending order. If it is not, VLOOKUP returns garbage.

=VLOOKUP(B4,$E$2:$F$5,2,TRUE)
  • B4 the rep's monthly sales (the value being matched against the tiers)
  • $E$2:$F$5 the tier table (locked with $ since the same range applies to every row)
  • 2 return column 2 of the tier table (the rate)
  • TRUE approximate match: pick the largest tier ≤ the lookup value
C4
fx
=VLOOKUP(B4,$E$2:$F$5,2,TRUE)
ABCDEFG
1Sales RepMonthly SalesCommissionSales FromRate
2Rachel Green$8,5005%$05%
3Tom Bradley$24,3008%$10,0008%
4Maria Santos$67,80012%$50,00012%
5Chris Evans$112,40015%$100,00015%
6
7
8
9
Formula entered in cell C4. Maria's $67,800 maps to the $50,000 tier and returns 12%.
Maria Santos sold $67,800. That falls between the $50,000 and $100,000 tiers. With TRUE, VLOOKUP picks the largest tier ≤ $67,800 (the $50,000 row) and returns its 12% rate.
If your commission tier table is not sorted ascending, VLOOKUP TRUE will return completely wrong results, silently, with no error message. Always sort first.

The $ sign mistake: why your formula breaks when you copy it down

This is the most common VLOOKUP mistake in real workplaces. You write a perfect formula in row 2, drag it down to row 50, and the results look wrong. The table range shifted with the formula.

Watch it happen step by step. You type the formula in E2, then drag it down to fill E3 and E4. Because there are no $ signs anchoring the table_array, every drag shifts the lookup range one column to the right.

=VLOOKUP(D2,A2:B5,2,FALSE)
  • D2 the code you're looking up
  • A2:B5 the catalog range: rows 2 through 5 of columns A and B
  • 2 return column 2 (Price)
  • FALSE exact match
Step 1: Formula typed in E2 (range correct)
E2
fx
=VLOOKUP(D2,A2:B5,2,FALSE)
ABCDEF
1CodePriceLookupResult
2P-1001$29.99P-1042$349.99
3P-1042$349.99P-1001↓ drag down
4P-1156$129.99P-1042
5P-2024$44.99
6
7
8
9
Step 1, typed in E2. Range A2:B5 covers the whole catalog. Result: $349.99, looks great… so far.
Step 2: Dragged down to E3 (range shifted to A3:B6)
E3
fx
=VLOOKUP(D3,A3:B6,2,FALSE)
ABCDEF
1CodePriceLookupResult
2P-1001$29.99P-1042$349.99
3P-1042$349.99P-1001#N/A
4P-1156$129.99P-1042↓ drag down
5P-2024$44.99
6
7
8
9
Step 2, dragged to E3. Every row reference shifted down by one: A2:B5 → A3:B6. P-1001 lives at row 2, which is no longer in range. Result: #N/A.
Step 3: Dragged down to E4 (range shifted to A4:B7)
E4
fx
=VLOOKUP(D4,A4:B7,2,FALSE)
ABCDEF
1CodePriceLookupResult
2P-1001$29.99P-1042$349.99
3P-1042$349.99P-1001#N/A
4P-1156$129.99P-1042#N/A
5P-2024$44.99
6
7
8
9
Step 3, dragged to E4. Range shifted again: A3:B6 → A4:B7. P-1042 is at row 3, completely outside the range. Result: #N/A.

How to fix it

Wrap the catalog range in dollar signs to make it absolute. The dollar sign before a column letter locks the column; the dollar sign before a row number locks the row. With every part of the range locked, dragging the formula down no longer shifts anything. Every copy keeps pointing at the same catalog.

=VLOOKUP(D2,$A$2:$B$5,2,FALSE)
  • $A$2 locked column A, locked row 2: anchors the top-left corner of the catalog
  • $B$5 locked column B, locked row 5: anchors the bottom-right corner of the catalog
  • Drag from E2 down every row gets =VLOOKUP(D{row},$A$2:$B$5,2,FALSE), same range, different lookup value. All three return the right price.
  • F4 shortcut click into a reference and tap F4. Excel toggles between A2, $A$2, A$2, $A2
Habit to build: the moment you finish typing a VLOOKUP, click on the table_array reference and press F4 to lock it with $ signs, every time, before you ever drag the formula.

Where people go wrong

  1. Using TRUE instead of FALSE

    You add TRUE at the end, or leave it blank (which defaults to TRUE), and your formula returns results that look almost right but are completely wrong. This is especially dangerous because Excel gives you no warning.

    Fix: Always explicitly type FALSE as the fourth argument unless you specifically need approximate matching and your table is sorted ascending.
  2. Forgetting $ signs when copying down

    You write a perfect formula in row 2 and drag it down. By row 10 the results are wrong or showing #REF! errors. The table range shifted with each row.

    Fix: Lock your table array with $ signs: =VLOOKUP(A2,$B:$D,3,FALSE). The $ makes those column references absolute.
  3. Column index out of range

    You specify col_index_num as 5 but your table_array only has 4 columns. Excel returns #REF! and you wonder why a formula that looks correct is failing.

    Fix: Count the columns in your table_array carefully. If table_array is B:E that is 4 columns, so col_index_num cannot exceed 4.
  4. Lookup value not in first column

    You want to look up by employee name but names are in column C and IDs are in column A. VLOOKUP can only search the first column of your range. If you set range to C:E it searches column C, but then it can't return column A because that would mean looking left.

    Fix: Restructure your data so the lookup column is first. Or switch to INDEX MATCH which can look in any direction.

Notes

  • VLOOKUP is case-insensitive. "apple" and "APPLE" return the same result
  • Wildcard characters (* and ?) work in lookup_value when range_lookup is FALSE
  • For multiple matches VLOOKUP returns the first match only. It stops searching after the first hit
  • VLOOKUP can handle up to 255 characters in the lookup_value argument
  • Column index counting starts at 1, not 0
  • In Excel 365 and Excel 2021 and later use XLOOKUP instead. It is more powerful and has no left-only limitation
  • Approximate match (TRUE) requires the first column to be sorted ascending. Unsorted data returns wrong results silently

Now prove it

Reading about VLOOKUP is one thing.

Using it under pressure on real data, with a manager waiting and a deadline in 20 minutes, is completely different.

These exercises put you in real job scenarios where VLOOKUP is the only way out.

Here is the thing about VLOOKUP.

You can read this page twice and still freeze when your manager drops a 10,000-row spreadsheet on your desk and says the numbers are wrong.

That gap, between knowing what VLOOKUP does and being able to use it confidently when it actually matters, is exactly what CellSkill is built to close.

Not with more reading.

With practice on scenarios that look like your actual job.

Start practicing VLOOKUP for free →
Free account · No credit card · Cancel anytime
Practice VLOOKUP
VLOOKUP in Excel: Formula, Examples & the 3 Common Errors · CellSkill