VLOOKUP Function in Excel: Look Up a Value in the First Column of a Table

VLOOKUP Function in Excel: Look Up a Value in the First Column of a Table featured illustration

πŸ“Ž This article includes 2 downloadable practice files ↓

⏱ 2 min read

LookupLevel: IntermediateAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. Common errors and fixes
  6. VLOOKUP in practice
  7. Where you will use it
  8. Worked example
  9. Mistakes people make
  10. Related functions
  11. Continue learning

VLOOKUP finds a value in the first column of a table and returns a value from another column in the same row.

Advertisement

Syntax

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Argument What it means
lookup_value What to find, e.g. a product code.
table_array The table; the code must be in its first column.
col_index_num Which column of the table to return (1 = first).
range_lookup FALSE for exact match (almost always), TRUE for bands.

Examples

Example 1

=VLOOKUP(A2, Prices!$A:$C, 3, FALSE)

Price of the code in A2 from the third column.

Example 2

=VLOOKUP(B2, $E$2:$F$6, 2, TRUE)

Commission rate from a sorted slab table.

Common errors and fixes

You see Why, and the fix
#N/A Not found β€” check spaces (TRIM), numbers stored as text, or wrap in IFNA.
Wrong column after inserting The column number is fixed. INDEX/MATCH or XLOOKUP do not break.
#REF! col_index_num is larger than the table width.
πŸ’‘ On Microsoft 365 or Excel 2021, prefer XLOOKUP: it looks left, defaults to exact match and has a built-in β€œnot found” argument.

VLOOKUP in practice

Where you will use it

  • Price of an item code
  • Employee name from ID
  • GST rate by HSN

Worked example

CodeFormulaResult
P02=IFERROR(VLOOKUP(A2,{"P01","Tea",250;"P02","Coffee",400},2,FALSE),"Not found")Coffee
P01=IFERROR(VLOOKUP(A3,{"P01","Tea",250;"P02","Coffee",400},2,FALSE),"Not found")Tea
P09=IFERROR(VLOOKUP(A4,{"P01","Tea",250;"P02","Coffee",400},2,FALSE),"Not found")Not found

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
Missing FALSEWithout it VLOOKUP returns wrong matches
Inserting columnsColumn numbers shift; XLOOKUP avoids this

XLOOKUP Β· INDEX Β· MATCH Β· HLOOKUP

πŸ“š Part of the free Excel course: Beginner β†’ Expert Β· Try it in the Formula Lab or ask the AI Helper.

⚑ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

πŸ“Ž Practice files for this article

⬇ Download all 2 files (ZIP Β· 39 KB)

  • πŸ“—
    Lookup scenarios workbookVLOOKUP, HLOOKUP, INDEX/MATCH and XLOOKUP side by side β€” vertical, horizontal, two-way β€” plus 6 real failure cases and their fixes, with PASS/FAIL checks.
    ⬇ XLSX Β· 10 KB
  • πŸ“—
    Practice workbook: Lookup & reference17 tasks on realistic sales data β€” type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX Β· 35 KB

Free to use for learning. Files with macros (.bas) are plain text β€” import them with Alt+F11 β†’ File β†’ Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free Β· AI can be wrong

Leave a Reply

Your email address will not be published. Required fields are marked *