Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

VLOOKUP in Excel: Step-by-Step Guide

· 4 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To put a VLOOKUP in Excel, type =VLOOKUP(lookup_value, table_array, col_index_num, FALSE) into the cell where you want the result, then press Enter. The lookup_value is what you're searching for, table_array is the range containing your data, col_index_num is the column number in that range to return a value from, and FALSE forces an exact match. This guide walks through the exact steps, common pitfalls, and fixes so the formula works the first time.

What You'll Need

  • Excel 2016 or later (Windows or Mac), or Excel for the web. Menu labels can differ slightly by version, device, or region.
  • A worksheet with a source table where the first column contains the values you want to look up (for example, product IDs or employee names).
  • A second area (same sheet or another) where you'll enter the formula and where the lookup values already exist.
  • Basic familiarity with selecting cell ranges and typing formulas.

Step-by-Step

  1. Identify your lookup value. Click the cell that contains the value you want to search for (e.g., a product code in cell A2 of your results sheet). This will be the first argument.
  2. Select the source table range. Go to the sheet with your data and highlight the entire table, including the column with the lookup values and all columns you might return. For example, select A2:D100. Do not include header row unless you want it as a possible match.
  3. Count the return column. In the selected range, count from the leftmost column (which must contain the lookup values) to the column containing the answer. If the answer is in the third column of the range, col_index_num is 3.
  4. Write the formula. In the result cell, type =VLOOKUP(, then click the lookup value cell, type a comma, switch to the source sheet and drag to select the table range (or type its address like Sheet2!$A$2:$D$100), type a comma, enter the column number, type a comma, then type FALSE and close the parenthesis. Example: =VLOOKUP(A2,Sheet2!$A$2:$D$100,3,FALSE).
  5. Press Enter. The cell should show the matching value from the source table. If you see #N/A, the lookup value was not found exactly.
  6. Copy the formula down. Drag the fill handle (small square at the bottom-right of the cell) down to apply the formula to other rows. Use absolute references (dollar signs) for the table range so it doesn't shift as you copy.
  7. Verify a few results. Manually check two or three rows against the source table to confirm the correct column was chosen and the range covers all data.

Common Mistakes

  • Forgetting FALSE for exact match. Omitting the fourth argument or using TRUE can return wrong matches if the first column isn't sorted. Always use FALSE for exact lookups.
  • Lookup column not first. VLOOKUP only searches the leftmost column of the table_array. If your lookup values are in column B, either rearrange the data or use INDEX/MATCH instead.
  • Relative range references. If you copy the formula without locking the table range (e.g., using $A$2:$D$100), the range shifts and returns errors or wrong values.
  • Mismatched data types. Numbers stored as text won't match numbers. Check for leading spaces or formatting differences.
  • Incorrect column count. Counting from the wrong starting column (e.g., including a header row) gives the wrong return column.

Tips

  • Use Excel's Formula AutoComplete: type =VLOOKUP( and Excel shows the argument order as a tooltip.
  • Name your table range (Formulas > Define Name) to make formulas easier to read, e.g., =VLOOKUP(A2,Products,3,FALSE).
  • For large datasets, consider XLOOKUP if your Excel version supports it (Excel 365, Excel 2021). It handles exact matches by default and can search left or right.
  • Press F4 while editing the table range to cycle through absolute/relative references quickly.
  • Use IFERROR to replace #N/A with a blank or custom message: =IFERROR(VLOOKUP(...),"Not found").

Troubleshooting

If the formula returns #N/A, the lookup value doesn't exist in the first column of your table_array. Check for extra spaces (use TRIM), text vs. number formatting, or hidden characters. If it returns #REF!, the col_index_num is greater than the number of columns in the range. If it returns #VALUE!, an argument is the wrong type (e.g., text where a number is expected). If results are wrong but not errors, confirm the table range is correct and locked, and that the lookup column is truly the leftmost. For #NAME?, check for misspelled function name or missing quotation marks around text values.

Frequently Asked Questions

Can VLOOKUP search to the left?

No. VLOOKUP only searches the first (leftmost) column of the table_array and returns values from columns to the right. Use INDEX/MATCH or XLOOKUP for leftward lookups.

What does the fourth argument do?

It controls match type: FALSE (or 0) for exact match, TRUE (or 1) for approximate match. Always use FALSE unless you specifically need a range lookup.

Why do I get #N/A when the value clearly exists?

Usually a data type mismatch: numbers stored as text, trailing spaces, or non-printing characters. Use TRIM and check cell formatting.

Can I use VLOOKUP across different workbooks?

Yes, but both workbooks must be open. Reference the external workbook like [Book2.xlsx]Sheet1!$A$2:$D$100. For reliability, copy the data into the same workbook.

Is VLOOKUP case-sensitive?

No, VLOOKUP is not case-sensitive. "Apple" and "apple" are treated the same. For case-sensitive lookups, use INDEX/MATCH with EXACT.

How many columns can VLOOKUP return?

As many as your table_array contains. The col_index_num can be any number from 1 up to the total columns in the range.