VLOOKUP: The Complete Guide with Examples

VLOOKUP in Excel is the most famous function in the program. It has been around for decades, appears in every beginner tutorial, and is used in millions of workbooks around the world. It is also the function that causes the most frustration, because small mistakes make it return wrong results or #N/A.

In this guide, I will explain VLOOKUP in Excel from scratch, with real examples. We will cover syntax, exact match, common errors, and the practical tips that make VLOOKUP reliable in everyday work. Whether you are learning VLOOKUP for the first time or want to fix a file where it is broken, this article will help.

VLOOKUP in Excel

What Does VLOOKUP Do?

VLOOKUP searches for a value in the first column of a range and returns a value from another column in the same row. Think of it as “look up this value, then return the matching information from another column.”

The syntax is:

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

Each argument means:

  • lookup_value: the value to search for (like a product ID or employee name)
  • table_array: the range where to search (must have the lookup column as the first column)
  • col_index_num: which column to return, counting from the start of the table_array
  • range_lookup: FALSE for exact match, TRUE for approximate match (rarely recommended)

Simple Example

Suppose you have a product list:

A2: P-101, B2: Chair, C2: 2500

A3: P-102, B3: Table, C3: 8500

A4: P-103, B4: Sofa, C4: 22000

You want to find the price for P-102. The formula:

=VLOOKUP(“P-102”, A2:C4, 3, FALSE)

It searches for P-102 in the first column (A), finds it in row 3, and returns the value in the third column of that row (C3 = 8500).

That is the basic pattern. Everything else in VLOOKUP in Excel is variations on this theme.

Exact Match vs Approximate Match

The fourth argument is critical. FALSE means exact match. TRUE means approximate match.

For almost every business use case, use FALSE. Exact match searches for the exact value. If not found, it returns #N/A.

TRUE is for cases where the values are sorted and you want “the largest value that is less than or equal to the lookup value.” This is used for tax brackets, grading scales, and commission tiers. It is not for everyday lookups like product prices or employee IDs.

If you leave the fourth argument out, VLOOKUP defaults to TRUE. This is a source of many bugs. Always write FALSE explicitly.

Using Cell References

Hardcoded values work, but cell references are more flexible. Suppose the product ID you want to look up is in cell F2. The formula:

=VLOOKUP(F2, A2:C4, 3, FALSE)

Now you can change F2 without editing the formula. This is how VLOOKUP in Excel is used in dashboards, forms, and reports.

Locking the Table Range

When you copy VLOOKUP in Excel down a column, the table_array should stay locked. Otherwise it shifts and returns wrong results. Use absolute references:

=VLOOKUP(F2, $A$2:$C$100, 3, FALSE)

The $A$2:$C$100 keeps the table locked while F2 shifts down. This is one of the most common mistakes beginners make. If your VLOOKUP works on the first row but fails below, this is almost always why.

Better yet, use an Excel Table with a structured reference:

=VLOOKUP(F2, tblProducts, 3, FALSE)

The Table name is inherently stable, so you do not need $ signs.

Handling #N/A with IFERROR

When VLOOKUP in Excel cannot find a value, it returns #N/A. In a report, that looks messy. Wrap the formula in IFERROR:

=IFERROR(VLOOKUP(F2, $A$2:$C$100, 3, FALSE), “Not found”)

Now instead of #N/A, the cell shows “Not found”. You can use a blank instead:

=IFERROR(VLOOKUP(F2, $A$2:$C$100, 3, FALSE), “”)

The choice depends on what looks cleaner in context.

VLOOKUP with Wildcards

VLOOKUP in Excel supports wildcards in the lookup value:

=VLOOKUP(“*Chair*”, $B$2:$C$100, 2, FALSE)

This searches for any value containing “Chair”. Useful when exact matches are not known.

Note: wildcards only work with exact match (FALSE). With TRUE, they behave differently or fail.

Lookup Value Must Be in the First Column

This is the biggest limitation of VLOOKUP in Excel. The lookup value must be in the first column of the table_array. If your data has Product Name in column A and Product ID in column B, and you want to look up by Product ID, VLOOKUP cannot do it directly.

You would need to either reorder the columns or use INDEX MATCH (or XLOOKUP). This is why many people eventually switch to INDEX MATCH – it has no such restriction.

VLOOKUP Returns the First Match

If the lookup column contains duplicates, VLOOKUP returns the first match, not the last. This is a design choice, not a bug. If you have VLOOKUP in Excel and need the last match, or need to handle duplicates differently, you will need a different approach.

Practical Example: Employee Lookup

You have an employee table:

A2: E-101, B2: Rahul, C2: Sales, D2: 45000

A3: E-102, B3: Priya, C3: Marketing, D3: 52000

…

You have a form where the user enters an employee ID in F2. You want to show their name, department, and salary.

Name:

=VLOOKUP(F2, $A$2:$D$500, 2, FALSE)

Department:

=VLOOKUP(F2, $A$2:$D$500, 3, FALSE)

Salary:

=VLOOKUP(F2, $A$2:$D$500, 4, FALSE)

Each formula references the same table but with a different column number. This is a classic VLOOKUP in Excel pattern. It works reliably, but it is fragile: if you insert a column, the numbers break. INDEX MATCH or XLOOKUP handle this better, but VLOOKUP works fine for smaller, stable tables.

Practical Example: Price Lookup in a Sales Sheet

You have an order sheet with product codes in column A. You have a price list in another sheet with codes and prices.

In the order sheet, column B (price):

=VLOOKUP(A2, Prices!$A$2:$B$500, 2, FALSE)

Copy down. Every order gets its price. If the price list changes, the formula picks up the new price.

One issue: if a product code in the order sheet is not in the price list, you get #N/A. Wrap with IFERROR to handle that gracefully.

Debugging VLOOKUP Errors

Common causes of #N/A or wrong results:

  1. The lookup value is not in the first column of the table. Reorder the table or use INDEX MATCH.
  2. The lookup value has trailing spaces. “P-101” is not the same as “P-101 “. Use TRIM or clean your data.
  3. Data types do not match. If the lookup value is text “101” and the table has number 101, VLOOKUP will not match. Convert one to the other.
  4. The table is not locked when copied. Add $ signs or use a Table reference.
  5. The column number is wrong. Count from the start of the table_array, not the sheet.
  6. FALSE is missing. The formula defaults to TRUE, returning approximate matches or wrong results.
  7. The lookup value exists in a column but with hidden characters. Copy the value from the table to test.

Try This on a Sample File

Build two small tables. In A1:C1 type Product, Code, Price, and add five products with prices. Then in E1:F1 type Code and Qty, and add three orders using codes from the first table, including one code that does not exist.

  1. Look up a price. In G2 type =VLOOKUP(F2,$B$2:$C$6,2,FALSE) and copy it down. The first two rows return prices; the row with the missing code returns #N/A.
  2. Lock the range. Notice the $ signs in the formula. Without them, copying the formula down would shift the table and break the results.
  3. Handle the error. Wrap the formula in IFERROR, like =IFERROR(VLOOKUP(F2,$B$2:$C$6,2,FALSE),”Not found”), and watch the #N/A turn into a readable message.

Now test what you learned. Change a price in the first table and watch the lookup results update. Then type a code with a trailing space in the orders table and see the lookup fail — that trailing space is the most common real-world cause of a VLOOKUP that looks right but returns #N/A. Fix it with TRIM and the lookup works again. Three habits from this one exercise: use FALSE, lock the table, and wrap the result in IFERROR.

Frequently Asked Questions

Can VLOOKUP look to the left?

No. VLOOKUP in Excel searches the first column and returns values to the right. For left lookups, use INDEX MATCH or XLOOKUP.

What is the difference between FALSE and 0 in VLOOKUP?

Nothing. FALSE and 0 both mean exact match. TRUE and 1 both mean approximate match. Use FALSE for readability.

Why does my VLOOKUP return #N/A when the value clearly exists?

The most common causes are trailing spaces, text-vs-number mismatch, or the value being in a column other than the first. Check with =TRIM(A2) and compare data types.

Can I use VLOOKUP with multiple criteria?

Not directly. You need to combine criteria into a helper column first, or use INDEX MATCH with array logic. XLOOKUP is simpler for this case.

Does VLOOKUP work across sheets?

Yes. Reference the sheet name in the table_array, like Prices!$A$2:$B$500.

Final Thoughts

VLOOKUP in Excel is not a bad function — it is just limited. For simple lookups where the lookup column is first and the table is stable, VLOOKUP is perfectly fine. For anything more complex — left lookups, multiple criteria, or files where columns are inserted — use INDEX MATCH or XLOOKUP. Whichever you use, remember the three rules: lock the table, use FALSE for exact match, and wrap in IFERROR for reports. Those three habits alone prevent most VLOOKUP problems.

Leave a Comment