VLOOKUP in Excel lets you search vertically through a table for a specific value and return a matching result from the same row—no programming needed. It’s the most common lookup function, but only works reliably if you set up your data correctly. Use it to fetch product prices, employee details, or sales figures by matching an ID or name against a reference list.

What You’ll Need

  • Microsoft Excel (Windows or Mac) version 2013 or later, or Excel for the web
  • A dataset with at least two columns (one for lookup values, one for results)
  • A clear understanding of your lookup column’s structure (text vs. numbers, uniqueness of values)
  • Basic familiarity with cell references (e.g., A1, $B$2)

Step-by-Step: How to Use VLOOKUP

  1. Prepare your data: Arrange your reference table in two columns:
    • Column A (leftmost): The values you’ll search for (e.g., product IDs, employee names). Call this your "lookup column."
    • Column B (next to it): The data you want VLOOKUP to return (e.g., prices, salaries). Call this your "return column."
    • Ensure there are no blank rows or merged cells in these columns.
    • If your reference table has headers, leave them in the first row.
    Example:
    Employee IDNameSalary
    101Alice75000
    102Bob82000
    Here, the lookup column is Employee ID, and the return column is Salary.
  2. Open the VLOOKUP function: In the cell where you want the result (e.g., D2), type =VLOOKUP( or click Formulas > Lookup & Reference > VLOOKUP. The formula bar will auto-fill: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
  3. Set the lookup_value: This is the value you’re searching for (e.g., 101 for Alice’s ID). Enter it directly or reference a cell: =VLOOKUP(A2, Why this works: If A2 contains 101, VLOOKUP will search the "Employee ID" column for that number.
  4. Define the table_array: Drag your mouse to select the entire reference table (including headers if they’re in row 1): =VLOOKUP(A2, B1:D2, Note: If your table has headers, include them in the array. If not, start from row 2. Alternative: Use named ranges (e.g., =VLOOKUP(A2, Employees,) if you’ve defined a named range called "Employees" for your table.
  5. Specify col_index_num: This is the column number in your table_array that contains the data to return. In our example (B1:D2), Salary is in column 3: =VLOOKUP(A2, B1:D2, 3, Caution: Count columns from left to right, starting at 1. The lookup column itself is 1, not 0.
  6. Choose range_lookup: Add a comma and enter either:
    • FALSE (or 0): Exact match only (recommended for most cases). VLOOKUP will return an error (#N/A) if no exact match is found.
    • TRUE (or 1): Approximate match (slower and less reliable). VLOOKUP will return the nearest smaller value. Only use this for sorted numeric columns (e.g., price lists).
    For our example: =VLOOKUP(A2, B1:D2, 3, FALSE)
  7. Close the formula: Press Enter. If A2 contains 101, the result will be 75000.
  8. Drag the formula: Copy the formula down to apply it to other rows (e.g., A3:A100). VLOOKUP will automatically look up each value in the lookup column.

Common Mistakes

Even small errors can make VLOOKUP fail silently. Here are the most frequent:

  • Incorrect col_index_num: Symptom: VLOOKUP returns data from the wrong column or an error. Cause: Counting columns incorrectly (e.g., using 2 for the return column when it’s actually 3). Fix: Double-check your table_array’s structure. For B1:D2, column 1 is Employee ID, column 2 is Name, and column 3 is Salary.
  • Forgetting FALSE (exact match): Symptom: VLOOKUP returns a result for a value that doesn’t exist, or skips valid entries. Cause: Using TRUE for approximate matching when you need an exact match, or omitting the range_lookup argument entirely. Fix: Always specify FALSE unless you’re working with sorted numeric data (e.g., price ranges).
  • Including headers in the table_array: Symptom: VLOOKUP returns data from the header row (e.g., "Salary" instead of 75000). Cause: Selecting the entire table including row 1 (where headers are) as the table_array. Fix: Exclude headers from the table_array unless you’re using named ranges. For example, use B2:D100 instead of B1:D100.
  • Using mixed data types: Symptom: VLOOKUP fails or returns incorrect results for text vs. numbers. Cause: Comparing a text lookup value (e.g., "101") to a numeric column (e.g., 101). Fix: Ensure both the lookup value and the lookup column match in type. Convert numbers to text with =TEXT(B2, "0") or text to numbers with =VALUE(C2) if needed.
  • Forgetting to update the table_array: Symptom: VLOOKUP stops working after adding new rows to the reference table. Cause: The table_array was initially defined too small (e.g., B1:D10 but the table now has 50 rows). Fix: Update the table_array to include all rows in your reference table or use a named range.
  • Typo in the lookup_value: Symptom: VLOOKUP returns #N/A even though the value exists. Cause: A single incorrect character in the lookup value (e.g., searching for "Alic" instead of "Alice"). Fix: Verify the exact spelling or number in the lookup column.

Tips for Faster and More Reliable VLOOKUP

  • Use named ranges: Define a named range (e.g., Employees) for your reference table. This makes formulas easier to read and update:
    1. Select your reference table (e.g., B1:D100).
    2. Go to Formulas > Define Name and name it (e.g., Employees).
    3. Use the name in your formula: =VLOOKUP(A2, Employees, 3, FALSE).
    Benefit: If you later add rows, you don’t need to rewrite the formula.
  • Freeze your headers: Make it easier to adjust formulas by freezing the first row:
    1. Select row 1.
    2. Go to View > Freeze Panes > Freeze Top Row.
  • Combine VLOOKUP with IFERROR: Handle cases where no match is found gracefully: =IFERROR(VLOOKUP(A2, Employees, 3, FALSE), "No match") This returns "No match" instead of #N/A.
  • Sort your reference table: If you must use TRUE for approximate matching (e.g., for price ranges), ensure the lookup column is sorted in ascending order (e.g., lowest price to highest).
  • Copy formulas intelligently: Use Ctrl+C and Ctrl+V to copy formulas, then edit each copy individually. Avoid dragging formulas down if your lookup_value changes dynamically (e.g., A2 changes per row).
  • Use absolute references for flexibility: Lock columns or rows in your table_array to avoid errors when copying: =VLOOKUP(A2, $B$2:$D$100, 3, FALSE) The $ signs keep columns B and D and rows 2 and 100 fixed.

Troubleshooting VLOOKUP

If VLOOKUP returns a wrong result or error:

  1. Check for #N/A: Cause: No exact match found (most common error). Fix:
    • Verify the lookup value (e.g., A2) matches a value in the lookup column exactly.
    • Check for hidden spaces or formatting differences (e.g., "101 " vs. "101"). Use =TRIM(A2) to clean text.
    • Ensure range_lookup is FALSE.
  2. Check for #REF!: Cause: The table_array includes merged cells or references an invalid range. Fix:
    • Unmerge all cells in the reference table.
    • Verify the table_array includes all rows and columns you intend.
    • If using named ranges, ensure they’re correctly defined.
  3. Check for #VALUE!: Cause: Incorrect data type mismatch (e.g., text vs. number). Fix:
    • Convert the lookup value to match the lookup column’s type. For example, if the lookup column is numeric, convert text to numbers with =VALUE(A2).
    • If the lookup column is text, ensure the lookup value is also text (e.g., use =TRIM(A2) to remove spaces).
  4. Check for #DIV/0!: Cause: The col_index_num is larger than the number of columns in the table_array. Fix:
    • Count the columns in your table_array. For B1:D2, there are 3 columns (B, C, D).
    • Adjust col_index_num to a valid number (1–3 in this case).
  5. Verify the table_array: Cause: The table_array doesn’t include all relevant rows or columns. Fix:
    • Select the table_array manually to confirm it’s correct.
    • If using a named range, check its definition under Formulas > Name Manager.
  6. Test with a static value: Temporary fix: Replace the lookup_value with a known value from your lookup column (e.g., =VLOOKUP("Bob", Employees, 2, FALSE)). If this works, the issue is with the dynamic lookup_value (e.g., A2).
  7. Enable error checking: Go to File > Options > Formulas and check "Enable workbooks and formulas to check error checking rules" to highlight potential issues.

Frequently Asked Questions

1. Can I use VLOOKUP to search horizontally (left to right)?

No. VLOOKUP only searches vertically (top to bottom) from left to right. For horizontal lookups, use HLOOKUP or transpose your data (turn columns into rows with =TRANSPOSE).

2. Why does VLOOKUP return a value even though I set range_lookup to FALSE?

This happens if your lookup column contains duplicate values. VLOOKUP will return the result from the first match it finds. To avoid this, ensure all lookup values are unique or use INDEX-MATCH (a more flexible alternative).

3. How do I make VLOOKUP case-insensitive?

VLOOKUP is case-sensitive by default. To match text regardless of case (e.g., "Alice" or "alice"), use a helper column with =UPPER(A2) in your lookup column or convert both values to uppercase/lowercase in your formula. Example: =VLOOKUP(UPPER(A2), UPPER(B2:B100), 3, FALSE) (Note: This assumes your return column is also text.)

4. Can I use VLOOKUP with dates?

Yes, but with caution. For exact date matches, use =VLOOKUP(B2, Dates, 2, FALSE) where the lookup column and lookup value are formatted as dates. For date ranges (e.g., "earlier than"), use TRUE for approximate matching, but ensure the date column is sorted.

5. Will VLOOKUP work if my data is in a different sheet?

Yes, but you must reference the other sheet in your table_array. For example: =VLOOKUP(A2, Sheet2!B2:D100, 3, FALSE) Replace Sheet2 with your sheet’s name and adjust the range accordingly.

6. Is VLOOKUP available in Excel for Mac?

Yes, VLOOKUP works identically in Excel for Mac (2016 and later). The formula syntax and behavior are the same as in Windows Excel.

7. How do I return multiple values from one lookup?

VLOOKUP can’t return multiple values directly. To fetch multiple columns (e.g., both name and salary for ID 101), use separate VLOOKUP formulas or switch to INDEX-MATCH with an array formula like: =INDEX(D2:D100, MATCH(A2, B2:B100, 0)) (For multiple columns, nest INDEX calls with the same row number.)