How to Use VLOOKUP in Google Sheets: Simple Guide
Use the
VLOOKUP function in Google Sheets to search for a value in the first column of a range and return a value from another column in the same row. The formula looks like =VLOOKUP(search_key, range, index, [is_sorted]), where you specify what to find, where to look, which column to return, and if the data is sorted.Syntax
The VLOOKUP function has four parts:
- search_key: The value you want to find.
- range: The table or cells where you want to search.
- index: The column number in the range to get the result from (starting at 1).
- is_sorted (optional): TRUE for approximate match (default), FALSE for exact match.
plaintext
=VLOOKUP(search_key, range, index, [is_sorted])Example
This example shows how to find a person's age by their name from a list.
plaintext
A1: Name B1: Age A2: Alice B2: 30 A3: Bob B3: 25 A4: Carol B4: 27 In cell D2, enter: =VLOOKUP("Bob", A1:B4, 2, FALSE)
Output
25
| Name | Age |
|---|---|
| Alice | 30 |
| Bob | 25 |
| Carol | 27 |
Common Pitfalls
Common mistakes include:
- Not setting
is_sortedto FALSE for exact matches, causing wrong results. - Using a wrong
indexnumber that is outside the range columns. - Searching for a value not in the first column of the range.
Example of a wrong formula and the fix:
plaintext
Wrong: =VLOOKUP("Bob", A1:B4, 2) (This uses approximate match by default and may give wrong results) Right: =VLOOKUP("Bob", A1:B4, 2, FALSE) (This forces exact match and returns correct age)
Quick Reference
| Parameter | Description | Example |
|---|---|---|
| search_key | Value to find | "Bob" |
| range | Cells to search in | A1:B4 |
| index | Column number to return | 2 |
| is_sorted | TRUE for approximate, FALSE for exact | FALSE |
Key Takeaways
Always set the last argument to FALSE for exact matches to avoid errors.
The search value must be in the first column of the range for VLOOKUP to work.
The index number must be within the range's column count.
VLOOKUP returns the first match it finds in the range.
Use VLOOKUP to quickly find related data in tables without manual searching.