Smart Systems for Home

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

Easy VLOOKUP Formula: Step-by-Step Guide

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

VLOOKUP in Excel (or Google Sheets) lets you find a value in the leftmost column of a table and return a matching value from another column in the same row. It’s the quickest way to pull data like prices, names, or statuses from a lookup table. This guide walks you through the formula in plain steps, assuming you have two tables: one where you want the result and another that holds the lookup data.

What You'll Need

  • A spreadsheet with two tables: the main table (where you want to pull data into) and a lookup table (where the data lives).
  • The lookup table must have a unique identifier (like an ID, product code, or email) in its leftmost column.
  • Both tables should be on the same sheet or in the same workbook—VLOOKUP can reference other sheets, but it’s easier to start with the same sheet.
  • Basic familiarity with entering formulas (typing = and cell references).

Step-by-Step

  1. Identify the lookup value. This is the cell in your main table that contains the identifier you want to match. For example, if you have a list of orders and you want to pull customer names, the lookup value would be the order ID cell, say A2.
  2. Select the cell where you want the result. Click the cell in the main table where the pulled data should appear, for example B2.
  3. Start typing the formula. Type =VLOOKUP( (or =VLOOKUP and then press Tab in Excel). The formula bar will show the arguments.
  4. Add the lookup value. After the opening parenthesis, click the cell with the lookup value (e.g., A2) or type its reference. Then type a comma.
  5. Define the table array. Select the entire lookup table, including the leftmost column and the column with the data you want to return. For example, if your lookup table is in columns D and E, rows 1 to 100, select D1:E100. Type a comma after this range.
  6. Enter the column index number. Count from the leftmost column of your selected table array. If the data you want is in the second column, type 2. If it’s in the third column, type 3, and so on. Type a comma.
  7. Choose exact or approximate match. Type FALSE for an exact match (recommended for IDs) or TRUE (or omit the argument) for an approximate match (only for numeric ranges like tax brackets). Close the parenthesis.
  8. Press Enter. The formula will return the matching value. For example: =VLOOKUP(A2, D1:E100, 2, FALSE).
  9. Copy the formula down. If you have multiple rows, click the cell with the formula and drag the fill handle (the small square at the bottom-right corner) down to apply it to other rows. The lookup value reference will adjust automatically (A2 becomes A3, etc.).
  10. Check the results. Verify a few entries against the lookup table to ensure the formula is returning the correct data.

Common Mistakes

  • Not using an exact match. If you omit FALSE and your data isn’t sorted, you’ll get wrong or unexpected results. Always use FALSE for exact matches.
  • Incorrect column index. The column index counts from the leftmost column of your selected range, not from column A of the sheet. If your range starts at D, column 1 is D, column 2 is E, etc.
  • Lookup value not in the first column. VLOOKUP only searches the leftmost column of the table array. If your identifier is not in the first column of the selected range, the formula will fail or return the wrong value.
  • Mixing data types. If the lookup value is a number stored as text (or vice versa), the match will fail. Ensure both are the same data type.
  • Trailing spaces. Extra spaces in the lookup value or in the lookup table can break the match. Use TRIM() if needed.

Tips

  • Use absolute references for the table array. When copying the formula down, you want the table range to stay fixed. Use dollar signs like $D$1:$E$100 so it doesn’t shift.
  • Sort for approximate matches. If you use TRUE, the lookup table must be sorted ascending by the first column, or you’ll get incorrect results.
  • Use a named range. Select the lookup table and give it a name (e.g., “Products”) in the Name Box. Then use =VLOOKUP(A2, Products, 2, FALSE)—easier to read and maintain.
  • Consider XLOOKUP (Excel 365/2021) or INDEX-MATCH. If your version supports XLOOKUP, it’s more flexible (can search any column, not just the first). But VLOOKUP still works fine for simple lookups.

Troubleshooting

If you get #N/A: The lookup value isn’t found. Check for typos, extra spaces, or data type mismatches. Verify the value exists in the first column of your table array.

If you get #REF!: The column index is larger than the number of columns in your table array. Reduce the index or expand the range.

If you get #VALUE!: The column index is less than 1, or there’s a syntax error. Check your formula for missing commas or parentheses.

If the formula returns the wrong value: You’re likely using TRUE (approximate match) with unsorted data, or the column index is off. Use FALSE and recount the columns.

If the formula works but shows 0: The source cell is empty or contains a zero. That might be correct, but if you expected text, check the source data.

Frequently Asked Questions

Can VLOOKUP search from right to left?

No—VLOOKUP only searches the leftmost column of the table array. To look up from a column to the right, use INDEX-MATCH or XLOOKUP instead.

What does FALSE mean in VLOOKUP?

FALSE tells Excel to look for an exact match. If no exact match is found, it returns #N/A. TRUE (or omitting the argument) uses an approximate match, which requires the first column to be sorted.

Can I use VLOOKUP across different sheets?

Yes. In the table array, reference the sheet name like Sheet2!$A$1:$B$100. If the sheet name has spaces, use single quotes: 'My Sheet'!$A$1:$B$100.

Why does VLOOKUP return #N/A even though the value exists?

Common causes: the lookup value is a number but the table has text (or vice versa), there are invisible spaces, or the value is in a column other than the first column of the table array. Use TRIM() and check the data types.

Can VLOOKUP handle duplicate lookup values?

VLOOKUP returns the first match it finds in the table. If there are duplicates, it will always return the first one. To get the last or all matches, you’d need a different approach like INDEX-MATCH with array formulas.

Is there a limit to the size of the table array?

No practical limit in modern Excel or Google Sheets. You can reference entire columns (e.g., D:E) but be careful—if you use whole columns, the column index counts from D, so column 2 would be E.