Formulyo

Excel + Google Sheets · Deep guide

VLOOKUP in Excel: find a value in a table

Looking up a price, a name or a code in a long table by eye is slow and error prone. VLOOKUP finds the row that matches a key and returns a value from another column of the same row, so your sheet answers the question for you.

VLOOKUP works in every modern version of Excel and in Google Sheets. This guide explains the four arguments, walks through an example with real numbers and shows how to avoid the errors that appear when the key is missing or duplicated. See also: COUNTIF guide and SUMIF guide.

How VLOOKUP works

VLOOKUP takes four arguments: the value to find, the table, the column number to return and whether the match is exact. Write the formula like this:

=VLOOKUP("c",B2:C6,2,FALSE)

Excel looks for the letter c in the first column of the table and returns the value from column 2 of that row. Always finish with FALSE so that only an exact match is accepted. Works in Excel 2010 or later.

Step by step example

  1. Type the keys in column B and the values in column C.
  2. Click an empty cell, for example E2.
  3. Type =VLOOKUP("c",B2:C6,2,FALSE) and press Enter.
  4. Compare the result with the table below.
AB
1Category (B)Price (C)
2a10
3b20
4c30
5b40
6d50

The expected result is 30, the value that sits next to c. If the key appears twice, VLOOKUP returns the first match, so check for duplicates before you trust the result.

Common errors

  1. The key is missing and Excel shows the not available error. Wrap the formula in IFERROR to show a friendly message.
  2. You forgot FALSE and the lookup uses approximate matching, which gives wrong values on unsorted data.
  3. The key column is not the first column of the table. VLOOKUP only searches the first column.
  4. Numbers stored as text do not match real numbers. Convert both sides to the same type.

If you use Excel 365 you may prefer XLOOKUP, which searches in any direction and has a built in value for missing keys. VLOOKUP remains the safest choice when you share files with people on older versions.

The same formula in other languages

Get 1 formula a day, free

Plus a free weekly planner template for Excel and Google Sheets. Unsubscribe in 1 click.

✓ Done! Check your inbox to confirm.

Want ready-made templates? See the Formulyo pack →

Keep learning