VLOOKUP in Excel searches for a value in the first column of a table and returns a corresponding value from another column in the same row. It’s essential for matching data across lists—like finding an employee’s department from their ID or a product’s price from its SKU. Before starting, ensure your data is organized in a table or range where the lookup value appears in the leftmost column, and all relevant columns are contiguous (no gaps). Also, confirm Excel is in a version that supports VLOOKUP (all modern versions, including Microsoft 365, Excel 2021, 2019, and 2016).

What You'll Need

  • A working Excel file (XLSX or XLSM format)
  • A clear lookup value (e.g., an ID, name, or code)
  • A data range containing at least two columns: one for the lookup value and one for the return value
  • Exact or approximate match preference (most users need exact match)

Step-by-Step

  1. Open your Excel workbook and ensure the data you want to search is in a contiguous block—no blank columns between columns. For example, if you’re looking up product IDs in column A and want prices from column B, both columns should be side-by-side with no empty space in between.
  2. Click the cell where you want the VLOOKUP result to appear (e.g., cell D2 for a new result column).
  3. Type =VLOOKUP( and Excel will show a tooltip with arguments: lookup_value, table_array, col_index_num, [range_lookup].
  4. Enter the lookup_value: click the cell containing the value to search for (e.g., A2 if you’re looking up the ID in A2). Alternatively, type the literal value in quotes (e.g., "ID123"), but cell references are safer for copying formulas down.
  5. Enter the table_array: select the full range of your data table, including both the lookup column and the return column. For example, if your IDs are in A2:A100 and prices in B2:B100, select A2:B100. Use absolute references (press F4 after typing the range) to lock it—e.g., $A$2:$B$100—so the range doesn’t shift when you copy the formula down.
  6. Enter the col_index_num: this is the column number *within your table_array* that contains the value to return. Since A is column 1 and B is column 2 in A2:B100, type 2 to return the price from the second column.
  7. Enter [range_lookup]: for exact matches (recommended for most tasks like finding a specific ID or name), type FALSE. For approximate matches (e.g., tax brackets), use TRUE or omit it—but only if your data is sorted ascending. For 99% of lookup tasks, use FALSE.
  8. Close the parenthesis and press Enter. The formula should now look like =VLOOKUP(A2,$A$2:$B$100,2,FALSE).
  9. To apply it to multiple rows, drag the fill handle (small square at the bottom-right of the selected cell) down the column. Excel will automatically adjust the lookup cell (e.g., A2 → A3) while keeping the table range fixed due to the absolute references.

Common Mistakes

  • Using the wrong column index: counting from the *entire worksheet* instead of the *table_array*. If your table starts at column C, but your table_array is C:D, column 1 is C, not C (which is column 3 on the sheet).
  • Missing or incorrect exact match flag: omitting FALSE or typing 0 instead leads to approximate matching, causing #N/A errors or wrong values when data isn’t sorted.
  • Unsorted data with approximate match: if you accidentally use TRUE, VLOOKUP assumes ascending order and may return incorrect matches.
  • Leading/trailing spaces or non-printing characters: extra spaces in lookup values (e.g., "ID123 " vs "ID123") cause mismatches. Use TRIM() or CLEAN() to clean data first.
  • Text vs. number mismatches: if the lookup value is text (e.g., "123") but the table contains numbers (e.g., 123), VLOOKUP fails. Convert data types using VALUE() or TEXT().
  • Reference errors in table_array: selecting a range that doesn’t include the return column (e.g., only A2:A100 instead of A2:B100) results in #REF! or #VALUE!.

Tips

  • Use XLOOKUP instead for new work: Excel’s newer XLOOKUP (available in Microsoft 365 and Excel 2021+) is more flexible—it searches any column, handles leftward lookups, and defaults to exact match. But VLOOKUP remains widely used for compatibility.
  • Wrap with IFERROR: to avoid #N/A errors cluttering your sheet, use =IFERROR(VLOOKUP(A2,$A$2:$B$100,2,FALSE),"Not found").
  • Verify column order: VLOOKUP *only* searches the first column of the table_array. If your lookup value isn’t in the leftmost column, rearrange your data or switch to INDEX/MATCH or XLOOKUP.
  • Use named ranges: name your data range (e.g., select A2:B100, type "Products" in the Name Box, press Enter), then use =VLOOKUP(A2,Products,2,FALSE) for readability.
  • Check for hidden rows/columns: VLOOKUP ignores filtered rows but still reads hidden ones—use filters or helper columns to exclude unwanted data.
  • Test with a small dataset first: copy a few rows to a new sheet to debug before applying to your full range.

Troubleshooting

When VLOOKUP returns #N/A, #REF!, #VALUE!, or an unexpected result, follow these steps:

  1. Check the lookup value exists in the first column: press Ctrl+F, paste the lookup value, and see if it’s found. If not, the data may contain hidden characters—use =EXACT(A2,"ID123") to test exact matches.
  2. Verify the table_array includes both columns: scroll to confirm the range spans from the lookup column to the return column (e.g., A:B, not just A).
  3. Confirm [range_lookup] is FALSE: if omitted, add ,FALSE to force an exact match.
  4. Check data types: select both the lookup cell and the first cell in the lookup column, then press Ctrl+1 to open Format Cells. Ensure both are set to the same type (e.g., both Number or both Text).
  5. Inspect for spaces or line breaks: use =LEN(A2) vs. =LEN(TRIM(A2)) to detect extra spaces. Clean with =TRIM(CLEAN(A2)) in a helper column.
  6. Test with a simple value: type "test" in the lookup column and try =VLOOKUP("test",A2:B10,2,FALSE) to isolate formula issues.
  7. Check for merged cells: VLOOKUP fails if the table_array includes merged cells. Unmerge them (Home > Merge & Center > Unmerge Cells).
  8. Ensure no circular references: if the formula cell is inside the table_array, Excel may error. Move the formula outside the data range.

Frequently Asked Questions

Can VLOOKUP search from right to left?

No. VLOOKUP only searches the first column of the table_array and returns values from columns to its right. To look left, use INDEX/MATCH or XLOOKUP instead.

Why does VLOOKUP return the wrong value instead of #N/A?

This usually happens when [range_lookup] is TRUE (or omitted) and your lookup column isn’t sorted ascending. Switch to FALSE for exact matches.

How do I look up multiple criteria (e.g., first name + last name)?

VLOOKUP handles only one criterion. Combine columns in a helper column (e.g., =A2 & " " & B2), then VLOOKUP against that. Alternatively, use XLOOKUP with search_mode=2 or INDEX/MATCH.

Does VLOOKUP work with dates?

Yes—but only if the date formats match exactly. Excel stores dates as serial numbers, so "1/1/2023" as text won’t match a date-formatted cell. Convert text dates to real dates using DATEVALUE() or Format Cells.

Can I use VLOOKUP across different workbooks?

Yes, but the source workbook must be open. Use a path like =VLOOKUP(A2,[SalesData.xlsx]Sheet1!$A:$B,2,FALSE). If closed, it returns #REF!. For reliability, copy data into a single workbook or use Power Query.

What’s the maximum size of table_array I can use?

Excel’s limit is 1,048,576 rows × 16,384 columns per worksheet, but performance slows with very large ranges. For datasets over 100,000 rows, consider Power Pivot or filtering your table_array to the minimum necessary rows.