How to Write a VLOOKUP Formula in Excel (Step-by-Step)

Formulas & functions · Updated November 23, 2026

VLOOKUP is Excel’s classic lookup function. It searches for a value in the first column of a table and returns a corresponding value from a column to the right. This guide shows you the exact syntax, a worked example, and the common pitfalls to avoid. The basic formula looks like this: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). For example, =VLOOKUP("A-100", A2:C10, 2, FALSE) finds “A-100” in A2:A10 and returns the matching value from column B.

What You’ll Need

  • A worksheet with the lookup value (what you’re searching for) in a separate cell or column.
  • A table of data where the lookup column is the leftmost column of the table range.
  • The column number (relative to the table) that holds the value you want to return.
  • Excel 2010 or later (the steps work in Excel 365, 2021, 2019, and 2016; Mac shortcuts are noted).

Step-by-Step

  1. Identify your lookup value. Decide which cell contains the value you want to search for. For example, if you have product IDs in column A of Sheet1 and you want to pull prices from Sheet2, the lookup value is in a cell like A2 on Sheet1.
  2. Define the table array. This is the entire range that includes the lookup column and the return column. It must start with the column containing your lookup values. For example, if your data is on Sheet2 with product IDs in column A and prices in column C, your table array is Sheet2!A:C or Sheet2!$A$2:$C$100 (absolute references with $ are recommended so the range doesn’t shift when you copy the formula).
  3. Count the column index number. Count columns from the left of the table array to the column you want to return. In the example above, column A is 1, column B is 2, column C is 3 – so the column index is 3.
  4. Choose the match type. Use FALSE for an exact match (most common) or TRUE for an approximate match (requires the first column to be sorted ascending). For exact matches, always type FALSE or 0.
  5. Write the formula. Click the cell where you want the result, type =VLOOKUP(, then reference the lookup cell, the table array, the column index, and the match type. Example: =VLOOKUP(A2, Sheet2!$A$2:$C$100, 3, FALSE).
  6. Press Enter. Excel returns the matching value. If the lookup value isn’t found, you’ll see #N/A.
  7. Copy the formula down. If you have multiple lookup values in column A, double-click the fill handle (the small square at the bottom-right of the cell) or drag it down. Ensure your table array uses absolute references ($A$2:$C$100) so it doesn’t shift.

Common Mistakes

  • Lookup column not on the left. VLOOKUP can only search the first column of the table array. If your lookup value is in column C and you want data from column A, VLOOKUP won’t work – use INDEX/MATCH or XLOOKUP instead.
  • Wrong column index number. Counting incorrectly gives you the wrong column’s data. Double-check by counting from the table array’s first column, not the worksheet’s column A.
  • Using TRUE without sorting. Approximate match (TRUE) assumes the first column is sorted A-to-Z. If it isn’t, you’ll get incorrect results. Use FALSE unless you know the data is sorted.
  • Text vs. number mismatch. If the lookup value is a number stored as text (e.g., “100” vs 100), VLOOKUP won’t match. Ensure both are the same data type.
  • Trailing spaces. Extra spaces in lookup values or table entries cause #N/A. Use =TRIM() to clean data.

Tips

  • Use exact match by default. Always type FALSE unless you have a specific reason for approximate matching. This prevents silent errors.
  • Use absolute references. When copying the formula, lock the table array with $ (e.g., $A$2:$C$100) to avoid range shifts.
  • Wrap in IFERROR. To hide #N/A, use =IFERROR(VLOOKUP(...), "Not Found") to display a friendly message.
  • Consider XLOOKUP. If you have Excel 2021 or Microsoft 365, XLOOKUP is more flexible (it can search left, return multiple columns, and handle errors). But VLOOKUP still works fine for simple lookups.
  • Use a named range. Define your table as a named range (e.g., “Products”) to make formulas easier to read: =VLOOKUP(A2, Products, 3, FALSE).

Troubleshooting

  • #N/A error: The lookup value isn’t found. Check for typos, extra spaces, or data type mismatches. Verify the lookup value exists in the first column of the table array.
  • #REF! error: The column index number is greater than the number of columns in the table array. For example, if your table is A:B and you ask for column 3, you get #REF!. Reduce the column index.
  • #VALUE! error: The column index is less than 1, or the lookup value is not a valid reference. Check the formula syntax.
  • Wrong results (not an error): If you get a value but it’s incorrect, you likely used TRUE with unsorted data, or the column index points to the wrong column. Change to FALSE and recount columns.
  • Formula not updating: If you change the lookup value and the result doesn’t change, check that calculation is set to Automatic (Formulas > Calculation Options > Automatic).

Frequently Asked Questions

1. Can VLOOKUP search for a value to the left of the lookup column?
No. VLOOKUP only looks rightward. Use INDEX/MATCH or XLOOKUP (Excel 2021/365) to search left.

2. What’s the difference between TRUE and FALSE in VLOOKUP?
FALSE finds an exact match. TRUE finds the closest match that is less than or equal to the lookup value, but requires the first column to be sorted ascending. Use FALSE for most tasks.

3. How do I return multiple columns with VLOOKUP?
You can’t in one formula. Write separate VLOOKUP formulas with different column index numbers (e.g., 2, 3, 4) or use XLOOKUP with an array return.

4. Why does VLOOKUP return #N/A even though the value exists?
Common causes: leading/trailing spaces, number stored as text, or the value is in a column that isn’t the first column of your table array. Use =TRIM(A2) and ensure data types match.

5. Can VLOOKUP work across different sheets?
Yes. Reference the sheet name in the table array, like Sheet2!$A$2:$C$100. If the sheet name has spaces, use single quotes: 'My Data'!$A$2:$C$100.

6. Is VLOOKUP case-sensitive?
No. VLOOKUP treats “apple” and “APPLE” as the same. If you need case-sensitive matching, use INDEX/MATCH with the EXACT function.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.