Ravindra BagaleCourses & study guides Track your progress

Excel VLOOKUP Function

Chala mitrano — today VLOOKUP. Look in the first column, count across to the answer column, and almost always use FALSE for an exact match.

Fictional sample data for learning. Warehouse SKUs + city stores (Nagpur / Manchester). Mixed ₹ and £. Fictional stock list.

Purpose

Look up a value in the left-most column of a table and return a value from a column to its right. Classic interview favourite; still everywhere in older workbooks.

Return value

The value from the chosen column of the matching row, or #N/A if nothing matches (exact mode).

Syntax

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

Arguments

ArgumentRequired?Description
lookup_valueRequiredThe value to find in the first column of table_array (SKU, ID, name, or a cell).
table_arrayRequiredThe full table range. First column must hold the lookup keys; return columns sit to the right.
col_index_numRequiredWhich column to return, counting from 1 at the left of table_array (2 = second column).
range_lookupOptionalFALSE or 0 = exact match (use this almost always). TRUE or 1 = approximate; table must be sorted ascending.

Version

Excel 2007 and later, Microsoft 365, LibreOffice Calc. Prefer XLOOKUP on Microsoft 365 when you can.

How to use — Why → What → How

Why: Price lists, employee codes and store IDs live in tables. You need the matching price or city without scanning by hand. In Indian back offices VLOOKUP is still the first lookup people learn. A purchase team in Nagpur keeps SKU in column A and price in column C; a UK sister store in Manchester mirror...

What: VLOOKUP finds lookup_value in the first column of table_array and returns the cell from column col_index_num of that row. Read the arguments table carefully; each one changes the answer in a specific way.

How — numbered steps:

  1. Click the cell where the answer should appear.
  2. Type =VLOOKUP( then click the lookup cell (example: SKU in F2).
  3. Select the whole table (first column = keys). Press F4 once to add $ locks.
  4. Type the column number to return (2 for the second column, 3 for the third…).
  5. Type FALSE for exact match, close the bracket, press Enter. Fill down if needed.
  6. Compare your result with the Answers sheet only after you attempt it.
  7. Write one sentence in your own words explaining when you would use this function at work.

Ravindra Bagale's Tip

Friends, lock the table with $ (example $A$2:$D$50) before you fill down. Without $, the table slides and answers go wrong.

Ravindra Bagale's Tip

Column index is a number, not a header name. If someone inserts a column, the number can silently point to the wrong field — that is why XLOOKUP is safer.

Ravindra Bagale's Tip

Friends, after class open a blank sheet and rebuild one VLOOKUP example without looking. That memory test beats re-reading the page.

Download practice file: practice-vlookup.xlsx (includes sheet About this data, practice sheets, and Answers).

Worked examples

1) Exact match — price for a SKU

Nagpur warehouse sheet. Find the ₹ price for SKU-104.

SKUItemPrice (₹)
SKU-101Atta 5kg420
SKU-104Oil 1L189
SKU-107Rice 10kg780
Formula: =VLOOKUP("SKU-104", A2:C4, 3, FALSE)

Result: 189

What it means: Excel finds SKU-104 in column 1 and returns column 3 (Price) from the same row.

2) Exact match missing — #N/A

Someone typed SKU-999 which is not in the list.

SKUItemPrice (₹)
SKU-101Atta 5kg420
SKU-104Oil 1L189
Formula: =VLOOKUP("SKU-999", A2:C3, 3, FALSE)

Result: #N/A

What it means: No exact key. Wrap with IFNA to show a friendly message in reports.

3) Return city for a store code (₹ / £ mix)

Store master: India and UK codes in one list.

StoreCityCurrency
ST-11Nagpur₹
ST-18Manchester£
ST-22Pune₹
Formula: =VLOOKUP("ST-18", A2:C4, 2, FALSE)

Result: Manchester

What it means: Lookup key ST-18; column index 2 returns City.

4) Approximate match for tax slab (sorted table)

Income slabs sorted ascending. Find the tax % for income 85,000.

Income fromTax %
00%
500005%
8000010%
12000015%
Formula: =VLOOKUP(85000, A2:B5, 2, TRUE)

Result: 10%

What it means: TRUE finds the largest key ≤ 85000, which is 80000 → 10%.

5) Friendly message with IFNA

MIS report must never show a red #N/A for a missing SKU.

SKUPrice (₹)
SKU-101420
SKU-104189
Formula: =IFNA(VLOOKUP("SKU-999", A2:B3, 2, FALSE), "Not in list")

Result: Not in list

What it means: IFNA catches only #N/A and replaces it with clean text.

6) Fill-down with locked table

Many SKUs in column F; table stays in A:C.

SKUPrice (₹)
SKU-101420
SKU-104189
SKU-107780
Formula: =VLOOKUP(F2, $A$2:$C$4, 3, FALSE)

Result: (price for whatever SKU is in F2)

What it means: Absolute refs keep the table fixed when you copy the formula down.

Common errors and fixes

#N/A — No exact match (or approximate table not sorted). Fix: Check the key; use FALSE; or wrap with IFNA.
#REF! — col_index_num is larger than the number of columns in table_array. Fix: Count columns from the left of the selected table.
Wrong price / city — range_lookup omitted (defaults to TRUE) or table not sorted. Fix: Always pass FALSE for IDs and codes.
#VALUE! — col_index_num is less than 1 or not a number. Fix: Use 1, 2, 3… only.
Shifted answers after insert — Someone inserted a column; your index number now points elsewhere. Fix: Update the index, or switch to XLOOKUP / INDEX+MATCH.

Notes and tips

  • VLOOKUP can only return columns to the right of the key column. For left-side returns use INDEX+MATCH or XLOOKUP.
  • Default range_lookup is TRUE — dangerous for IDs. Type FALSE every time unless you truly need a sorted approximate match.
  • Duplicate keys: VLOOKUP returns the first match only.
  • On Microsoft 365, teach XLOOKUP first; still learn VLOOKUP because older files and interviews use it.
  • In Indian back offices VLOOKUP is still the first lookup people learn. A purchase team in Nagpur keeps SKU in column A and price in column C; a UK sister store in Manchester mirrors the same layout with pound prices. Exact match with FALSE (or 0) is the safe habit for codes. Approximate match with TRUE is only for sorted numeric slabs such as tax or discount bands. When a colleague inserts a column between Item and Price, every col_index_num silently shifts — that single pain point is why modern teams move to XLOOKUP or INDEX plus MATCH. Practice locking the table with dollar signs before you fill down, and wrap reports with IFNA so missing SKUs show clear text instead of red #N/A.
  • VLOOKUP vs XLOOKUP: VLOOKUP needs the key on the left and a column number; XLOOKUP takes separate lookup and return arrays, can search either side, and has a built-in if_not_found. Learn both: VLOOKUP for legacy and interviews, XLOOKUP for new Microsoft 365 work.
  • Fictional sample data only — practice amounts and names are made for learning.
  • After you finish the 10 tasks, re-read the errors table once; most class mistakes are listed there.
  • Keep ranges locked with absolute references when you copy formulas down a column of inputs.
  • Say the business question in plain words before you type the equals sign — it prevents wrong arguments.

In real work

In Indian back offices VLOOKUP is still the first lookup people learn. A purchase team in Nagpur keeps SKU in column A and price in column C; a UK sister store in Manchester mirrors the same layout with pound prices. Exact match with FALSE (or 0) is the safe habit for codes. Approximate match with TRUE is only for sorted numeric slabs such as tax or discount bands. When a colleague inserts a column between Item and Price, every col_index_num silently shifts — that single pain point is why modern teams move to XLOOKUP or INDEX plus MATCH. Practice locking the table with dollar signs before you fill down, and wrap reports with IFNA so missing SKUs show clear text instead of red #N/A.

How it compares

VLOOKUP vs XLOOKUP: VLOOKUP needs the key on the left and a column number; XLOOKUP takes separate lookup and return arrays, can search either side, and has a built-in if_not_found. Learn both: VLOOKUP for legacy and interviews, XLOOKUP for new Microsoft 365 work.

Interview corner

Why do interviewers still ask VLOOKUP if XLOOKUP exists?
Because millions of legacy files and shared templates still use it, and it proves you understand exact vs approximate match.
What breaks when someone inserts a column?
The numeric col_index_num no longer points at the same field, so answers look plausible but wrong.
How do you look left with VLOOKUP?
You cannot. Reshape the table, or use INDEX+MATCH / XLOOKUP.

XLOOKUP, INDEX, MATCH, HLOOKUP, IFNA

Practice tasks (10)

  1. Task 1. On sheet Stock, return Price for SKU-104 in cell G2 (exact match).
    Hint: column index for Price — count from the left of the table.
  2. Task 2. In G3, look up SKU-999 and show Not in list when missing.
    Hint: wrap VLOOKUP with IFNA.
  3. Task 3. Return City for store ST-18.
    Hint: City is column 2 of the store table.
  4. Task 4. Write a fill-down formula that looks up the SKU in F2 with a locked table.
    Hint: press F4 on the table range.
  5. Task 5. Explain in one line why inserting a column can break VLOOKUP silently.
    Hint: think about the column index number.
  6. Task 6. Using approximate match, find the tax % for income 85,000 on the Tax sheet.
    Hint: range_lookup TRUE; table must stay sorted.
  7. Task 7. Change your Price lookup so a blank SKU cell shows Enter SKU.
    Hint: IF or IFNA around VLOOKUP.
  8. Task 8. Return the Item name (not price) for SKU-107.
    Hint: different column index.
  9. Task 9. Find what happens if you omit FALSE on an unsorted ID list — write the wrong result you see.
    Hint: compare with and without FALSE.
  10. Task 10. Bonus: return Currency symbol for ST-11.
    Hint: third column of the store table.

Quick quiz

Q1. VLOOKUP can return a value from a column to the LEFT of the lookup column.
Q2. For product codes and employee IDs you should set range_lookup to:
Q3. col_index_num counts from:
Q4. What does VLOOKUP return when FALSE finds no match?
Q5. Which wrap hides #N/A with friendly text?

Answers: Q1=False, Q2=FALSE, Q3=The left of table_array, Q4=#N/A, Q5=IFNA or IFERROR (check after you try).

Revision card

Standalone card (no tip or photo strip). QR opens this lesson. Download the PNG and revise offline.

Revision card: VLOOKUP
VLOOKUP revision card