Smart Systems for Home

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

Excel VLOOKUP Guide: How to Use it Step-by-Step

· 7 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

The VLOOKUP (Vertical Lookup) function in Microsoft Excel is used to find specific information in a large table or a separate range of cells based on a unique identifier. Essentially, it allows you to search for a value in the leftmost column of a table and return a value in the same row from a column you specify. This is incredibly useful for merging data from two different sheets, such as looking up a customer's email address using their Customer ID or finding the price of a product using a SKU number.

What You'll Need

  • Microsoft Excel installed on your computer (works across most versions including Office 365, 2021, 2019, and 2016).
  • A source table (the data you want to pull information from).
  • A lookup value (the piece of information you already have, which exists in both your current cell and the first column of the source table).
  • Organized data where the unique identifier is located in the far-left column of your search range.

Step-by-Step

  1. Prepare Your Data: Ensure the table you are searching (the source table) is organized correctly. VLOOKUP only searches from left to right. This means the column containing the value you are searching for (the unique ID) must be the very first column in the range you select. If your ID is in the middle of the table, you will need to move it to the left or use a different function.
  2. Select the Target Cell: Click on the cell where you want the result to appear. For example, if you have a list of Product IDs in Column A and you want the Product Name to appear in Column B, click on cell B2.
  3. Start the Formula: Type =VLOOKUP( into the cell. This tells Excel you are starting a vertical lookup operation.
  4. Define the Lookup Value: Immediately after the opening parenthesis, click on the cell that contains the value you are searching for. If you are in cell B2 and the ID is in A2, click A2. Your formula should now look like =VLOOKUP(A2,. This is the "key" Excel will use to find the matching row.
  5. Select the Table Array: Type a comma, then highlight the entire range of cells in your source table that contains both the lookup value and the data you want to retrieve. For example, if your data is on Sheet2 from A1 to C500, highlight that range. To make the formula easier to copy down a list, press F4 (or click the formula bar and add dollar signs) to create an absolute reference, like Sheet2!$A$1:$C$500. Your formula now looks like =VLOOKUP(A2, Sheet2!$A$1:$C$500,.
  6. Specify the Column Index Number: Type another comma, then enter the number of the column (counting from the left of your selected range) that contains the information you want to return. If your range is A to C and you want data from column C, enter 3 because C is the third column. Your formula now looks like =VLOOKUP(A2, Sheet2!$A$1:$C$500, 3,.
  7. Set the Range Lookup (Exact vs. Approximate): Type one final comma and then enter either FALSE or TRUE. In 99% of business cases, you want an exact match, so type FALSE (or 0). If you use TRUE (or 1), Excel will look for the closest match, which is typically only used for tax brackets or tiered commission scales.
  8. Complete and Execute: Close the parenthesis ) and press Enter. The formula should now look like: =VLOOKUP(A2, Sheet2!$A$1:$C$500, 3, FALSE).
  9. Fill the Formula: Hover your mouse over the bottom-right corner of the cell until you see a small black cross (the fill handle). Click and drag this down to apply the VLOOKUP to all other rows in your list.

Common Mistakes

One of the most frequent errors is forgetting to use absolute references (the dollar signs) for the table array. If you use A1:C500 instead of $A$1:$C$500, Excel will shift the search area down by one row every time you drag the formula down, leading to missing data or incorrect results in the lower half of your list.

Another common mistake is searching for a value that isn't in the leftmost column. If your unique ID is in Column B and you want to pull data from Column A, VLOOKUP cannot do this. It is a one-way street moving from left to right. To solve this, you must either move the ID column to the left or use the INDEX and MATCH functions together.

Data type mismatches are also a major hurdle. If your lookup value is stored as a number (e.g., 101) but the source table stores that same ID as text (e.g., "101"), VLOOKUP will return an error even though they look identical to the human eye. Both the lookup value and the first column of the table array must be the same format.

Finally, users often forget the final FALSE argument. If you leave the last part of the formula blank, Excel defaults to TRUE (approximate match). This can result in Excel returning a value from a row that is "close enough" but technically incorrect, which can be disastrous for financial or inventory reporting.

Tips

To make your spreadsheets more professional and easier to maintain, consider converting your source data into an official Excel Table (Select data > Ctrl + T). When you use a Table, you can give it a name (like "ProductList"). Instead of using cell ranges like $A$1:$C$500, you can simply use the name ProductList in your formula. This is called a structured reference, and the best part is that if you add new rows to the table, VLOOKUP will automatically include them without you having to update the range in every formula.

If you find yourself writing very long VLOOKUP formulas, use the "Insert Function" button (fx) next to the formula bar. This opens a dialog box that guides you through each argument (Lookup_value, Table_array, etc.), which helps prevent syntax errors like missing commas or parentheses.

For those using newer versions of Excel (Office 365), you might explore the XLOOKUP function. XLOOKUP is the successor to VLOOKUP; it can look to the left, defaults to an exact match, and doesn't require you to count columns manually. However, VLOOKUP remains the industry standard and is essential for compatibility with older files.

Troubleshooting

If your VLOOKUP is not working as expected, follow these checks in order:

Check for #N/A Errors: This is the most common error. It simply means Excel cannot find the lookup value in the first column of your table. First, check for leading or trailing spaces in your cells. A cell containing "Apple " (with a space) will not match "Apple". Use the =TRIM() function to remove extra spaces from your data.

Verify Data Types: Check if one value is formatted as "Text" and the other as "Number". You can quickly test this by using the =ISNUMBER() function on both cells. If one is TRUE and the other is FALSE, you need to convert them to match. You can do this by selecting the column, going to the Data tab, selecting "Text to Columns", and clicking Finish.

Confirm the Column Index: If VLOOKUP is returning the wrong piece of information (e.g., returning the Price instead of the Product Name), double-check your column index number. Remember that the count starts at 1 for the leftmost column of your selected range, regardless of where that range sits on the actual spreadsheet.

Check for Hidden Rows or Filters: Sometimes VLOOKUP appears to fail because the source data is filtered or hidden. While VLOOKUP still searches hidden rows, it can be confusing for the user to verify the result visually. Clear all filters to ensure you are looking at the correct source data.

If that did not work: Try re-selecting the table array. Ensure you haven't accidentally selected an empty column to the left of your data, which would shift your column index count and cause the formula to return the wrong data or an error.

Frequently Asked Questions

Can VLOOKUP find data in a different workbook?

Yes. When selecting your table array, you can simply click over to another open Excel file and highlight the range. Excel will automatically include the file path in the formula. Just be aware that if the source file is moved or renamed, the link may break.

What happens if there are duplicate values in the first column?

VLOOKUP only returns the first match it finds. If your lookup value appears three times in the source table, Excel will stop at the first occurrence and ignore the others. To handle duplicates, you would need to use a Pivot Table or the FILTER function.

Can I use VLOOKUP to find a value to the left of my ID column?

No, VLOOKUP is strictly designed to search the leftmost column and move right. To look to the left, you must use a combination of INDEX and MATCH functions, or use XLOOKUP if your version of Excel supports it.

Why is my VLOOKUP returning 0 instead of a blank cell?

If VLOOKUP finds a match but the cell it returns is empty, Excel displays a 0 by default. You can fix this by adding an empty string to the end of your formula, like =VLOOKUP(...) & "", which forces Excel to treat the result as text and show a blank instead of a zero.

Does VLOOKUP slow down my computer?

In very large spreadsheets (tens of thousands of rows), having thousands of VLOOKUP formulas can slow down calculation speed. In these cases, using INDEX and MATCH or converting your data into a Power Pivot model is more efficient for performance.