How to Set Up VLOOKUP in Excel: Step-by-Step

Formulas & functions · Updated November 23, 2026

VLOOKUP is Excel’s classic function for looking up a value in the first column of a table and returning a matching value from another column. For example, you can find an employee’s department by their ID, or a product’s price by its code. The syntax is =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). This guide walks you through setting up your first VLOOKUP, with clear examples, common mistakes, and troubleshooting tips.

What You’ll Need

  • A worksheet with a lookup table: the first column must contain the unique identifiers you’ll search for (e.g., ID numbers, product codes).
  • A cell where you want to display the result (the formula cell).
  • Excel for Microsoft 365, Excel 2021, Excel 2019, or an earlier version – VLOOKUP works in all versions.
  • Basic familiarity with entering formulas (starting with =).

Step-by-Step

  1. Prepare your data. Ensure your lookup table has headers in row 1 (optional but helpful) and that the column you want to search (the lookup column) is the leftmost column of the table. Example: A1:C10 with headers in A1:C1, IDs in A2:A10, names in B2:B10, and departments in C2:C10.
  2. Select the cell for the formula. Click the cell where you want the result to appear, e.g., F2.
  3. Start typing the formula. Type =VLOOKUP(. Excel will show a tooltip with the arguments.
  4. Enter the lookup value. Click on the cell that contains the value you want to look up, e.g., E2 (where you’ll type an ID). Or type the cell reference directly. For a literal value, enclose text in double quotes (e.g., "A123") or just type a number.
  5. Enter the table array. Type a comma, then select the entire table range, including the lookup column and the result column. For example, A2:C10. Use absolute references (press F4 on Windows, Cmd+T on Mac) to lock the range so it doesn’t change when you copy the formula down.
  6. Enter the column index number. Type a comma, then the number of the column in the table that contains the result you want. Count from the left: column A is 1, B is 2, C is 3. So for department (column C), use 3.
  7. Choose exact or approximate match. Type a comma, then either FALSE for an exact match (recommended for IDs) or TRUE for an approximate match (for ranges like tax brackets). If you omit this, Excel defaults to TRUE, which can cause surprising results.
  8. Close the formula. Type a closing parenthesis ) and press Enter. The result appears in the cell.

Example: With IDs in A2:A10, names in B2:B10, departments in C2:C10, and the ID to look up in E2, enter in F2: =VLOOKUP(E2, A2:C10, 3, FALSE). If E2 contains “A104” and that ID is in A5, F2 returns the department from C5.

Common Mistakes

  • Lookup column not leftmost: VLOOKUP can only search the first column of the table array. If your IDs are in column B, you must rearrange or use INDEX/MATCH.
  • Column index number wrong: Counting from the left, not from the lookup column. If your table is B2:D10 and you want column D, the index is 3, not 2.
  • Using TRUE by accident: If you omit the last argument or type TRUE, Excel may return an approximate match, which often gives wrong results with text or unsorted data.
  • Relative references when copying: If you don’t lock the table array with $, the range shifts as you drag the formula down, causing errors.
  • Text vs. number mismatch: If the lookup value is a number stored as text (or vice versa), VLOOKUP won’t match. Check cell formats and use the VALUE or TEXT function if needed.

Tips

  • Use FALSE almost always for exact matches. It’s safer and works with unsorted data.
  • For approximate matches (TRUE), sort the lookup column in ascending order (A to Z, smallest to largest). Otherwise results are unpredictable.
  • Use a named range for the table array, e.g., =VLOOKUP(E2, EmployeeTable, 3, FALSE). This makes formulas easier to read and maintain.
  • If you need to return multiple columns, consider using INDEX/MATCH or XLOOKUP (if you have Excel 2021 or 365) instead of several VLOOKUPs.
  • Wrap VLOOKUP in IFERROR to handle missing values gracefully: =IFERROR(VLOOKUP(E2, A2:C10, 3, FALSE), "Not found").
  • On Mac, use Cmd+T to toggle absolute references; on Windows, F4.

Troubleshooting

  • #N/A error: The lookup value isn’t found. Double-check the value in E2 (extra spaces, different data type). Ensure the lookup column contains that value exactly. If using TRUE, verify the column is sorted.
  • #REF! error: The column index number is larger than the number of columns in the table array. Count your columns again.
  • #VALUE! error: The column index number is less than 1, or the lookup value is not a valid type. Check your arguments.
  • Wrong result (not an error): If you got a value but it’s not what you expected, you likely used TRUE without sorting, or the column index points to the wrong column. Switch to FALSE and recheck.
  • Formula works in one cell but not when copied: Your table array is probably relative. Edit the formula and press F4 to lock the range.
  • Leading/trailing spaces: If your IDs have invisible spaces, use =TRIM(A2) in a helper column, or use =VLOOKUP(TRIM(E2), A2:C10, 3, FALSE).

Frequently Asked Questions

  • Can VLOOKUP look to the left? No. VLOOKUP only searches the first column of the table array and returns values to the right. Use INDEX/MATCH or XLOOKUP for leftward lookups.
  • What is the difference between TRUE and FALSE? FALSE requires an exact match. TRUE finds the closest match that is less than or equal to the lookup value, but the lookup column must be sorted ascending. For most uses, use FALSE.
  • Can I use VLOOKUP with two criteria? Not directly. You can add a helper column that concatenates the criteria (e.g., =A2&B2) and then VLOOKUP on that, or use INDEX/MATCH with an array formula.
  • Why is VLOOKUP returning the wrong value even with FALSE? Check for hidden spaces or non-printing characters. Use the TRIM function or the CLEAN function. Also ensure the lookup value is the correct data type (number vs text).
  • Is VLOOKUP case-sensitive? No, VLOOKUP is not case-sensitive. If you need case-sensitive matching, use INDEX/MATCH with EXACT.
  • Can VLOOKUP return multiple columns? No, it returns a single value. Use multiple VLOOKUPs with different column indices, or switch to XLOOKUP or INDEX/MATCH.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.