Practice
Tutorial
Task 1: Basic VLOOKUP
Use VLOOKUP to find the department of employee with ID 102. The formula should look in column A for the ID and return the corresponding department from column C.
VLOOKUP Tutorial
The VLOOKUP function searches for a value in the first column of a table and returns a value in the same row from a specified column.
Syntax
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Arguments
| Argument | Description |
|---|---|
| lookup_value | The value to search for in the first column of the table |
| table_array | The range of cells that contains the data |
| col_index_num | The column number in the table from which to return a value |
| range_lookup | Optional. FALSE for exact match, TRUE for approximate match |
Example
Given this data:
| ID | Name | Department | |-----|--------|-------------| | 101 | John | Sales | | 102 | Sarah | Marketing | | 103 | Mike | IT |
To find Sarah's department:
=VLOOKUP(102, A2:C4, 3, FALSE)
This would return "Marketing"
Common Errors
- #N/A - Lookup value not found (check your range_lookup setting)
- #REF! - Column index number is greater than number of columns in table
- #VALUE! - Column index number is less than 1