Skip to content
Blog/Excel
Excel

How to Use VLOOKUP in Excel

VLOOKUP finds a value in a table by searching the first column and returning a result from another column. Here's exactly how it works — and when to use XLOOKUP instead.

Do this with AI

Try Griddy free

Start in your browser. Also works with Excel and Google Sheets.

By Justin Freels//5 min read

VLOOKUP is one of the most-used formulas in Excel. It searches for a value in the leftmost column of a range, then returns a value from a column you specify to the right. If you've ever needed to pull data from one table into another, VLOOKUP is usually the answer.

The syntax

fx
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
  • lookup_value — The value you're searching for (e.g., a product ID, employee name, or order number)
  • table_array — The range that contains your data, starting with the column you're searching
  • col_index_num — Which column in that range to return (1 = first column, 2 = second, etc.)
  • range_lookup — Use FALSE for an exact match (almost always what you want)

Step-by-step example

Say you have a product table in columns A–C: Product ID, Product Name, Price. You want to pull the price for a specific product ID into another sheet.

Step 1. Click the cell where you want the price to appear.

Step 2. Type the formula, referencing the product ID you want to look up (say it's in cell E2):

fx
=VLOOKUP(E2, A:C, 3, FALSE)

This searches column A for the value in E2, then returns whatever is in the 3rd column (Price).

Step 3. Press Enter. Drag the formula down to fill other rows.

TIP

Lock the table reference with dollar signs so it doesn't shift when you drag: =VLOOKUP(E2, $A:$C, 3, FALSE)

Common errors and fixes

ErrorCauseFix
#N/ALookup value not found in the first columnCheck for extra spaces; make sure data types match (text vs. number)
#REF!col_index_num is larger than the number of columns in your rangeReduce the index number or expand your range
Wrong resultrange_lookup not set to FALSEAdd FALSE as the fourth argument

WATCH OUT

VLOOKUP can only look to the right. If your lookup column isn't the leftmost column in your range, use XLOOKUP or INDEX/MATCH instead.

When to use XLOOKUP instead

If you're on Microsoft 365 or Excel 2021+, XLOOKUP is almost always better:

fx
=XLOOKUP(E2, A:A, C:C, "Not found")

XLOOKUP can look left or right, handles missing values gracefully with a default, and doesn't break when you insert columns. The only reason to still use VLOOKUP is compatibility with older Excel versions.

The Griddy way

If you're not sure which lookup formula to use, or you keep getting #N/A errors and can't figure out why — just describe what you're trying to do in plain English. Griddy writes the correct formula for your exact data, runs it, and explains what it did.

"Pull the price from the Products sheet for each order ID in column A"

That's it. No formula syntax required.

A safer VLOOKUP checklist

Before using VLOOKUP, confirm that the lookup key is in the first column of the selected table and that the return column is to its right. Use FALSE or 0 for an exact match unless you are intentionally using a sorted banding table. Count the return-column index from the left edge of the selected table, not from the worksheet’s column letters.

Duplicate keys deserve an explicit decision. VLOOKUP returns the first matching row, so it cannot tell you that two records share the same ID. Add a duplicate check with COUNTIF, clean text and number types, and decide what a missing key should display. If the workbook supports XLOOKUP, it can make left/right lookups and a missing-result message easier to read. For shared or legacy workbooks, VLOOKUP may still be the compatibility choice; document the match mode so a future editor does not remove it.

Sources

Do this with AI

Turn the instructions into a finished spreadsheet.

Tell Griddy what you need in plain English, then inspect and keep editing the result in the browser, Excel, or Google Sheets.

Try Griddy freeStart in your browser. No download required.
Also works withExcel Google Sheets

Use this on real templates

Apply VLOOKUP to client and pipeline data

VLOOKUP is still common in lead, sales, and client workflows where one table needs to pull information from another quickly.

Sales