how to use vlookup
VLOOKUP is an Excel function that searches for a value in the first column of a table and returns a value from the same row in a specified column. It’s perfect for quickly pulling data from large spreadsheets, like finding an employee’s salary by their ID number.
Basic Syntax
The formula looks like this:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
- lookup_value : The value you’re searching for (e.g., an ID in cell A2).
- table_array : The data range, including the lookup column and return columns (e.g., B2:D10).
- col_index_num : The column number in the range to return (count from left, starting at 1).
- [range_lookup] : Use
FALSEfor exact match orTRUEfor approximate match (default isTRUE).
Step-by-Step Example
Imagine a table with Employee ID (Column A), Name (B), and Salary (C). To find the salary for ID in A2:
- Click the cell for the result (e.g., D2).
- Type
=VLOOKUP(A2,A:C,3,FALSE). - Press Enter—Excel returns the salary from Column C for that ID.
Common Tips
- First column must contain lookup values —VLOOKUP searches only the leftmost column.
- Use absolute references (e.g.,
$A$2:$D$10) for the table_array when copying the formula down. - Handle errors with
IFERROR, like=IFERROR(VLOOKUP(...), "Not Found").
Key Arguments Table
| Argument | Description | Example |
|---|---|---|
| lookup_value | Value to search for (cell reference or text) | A2 |
| table_array | Data range including lookup and return columns | B2:D10 |
| col_index_num | Column number to return (from left) | 3 |
| range_lookup | FALSE for exact, TRUE for approximate | FALSE |