In Google Sheets, VLOOKUP searches for a value in the first column of a range and returns a corresponding value from another column in the same row, using the syntax =VLOOKUP(search_key, range, index, [is_sorted]). For example, =VLOOKUP("A-100", A2:C20, 3, FALSE) finds “A-100” in column A and returns the matching value from column C.
What VLOOKUP Does in Google Sheets
VLOOKUP stands for “vertical lookup.” It is designed for tables where each row is a record and the first column contains a unique identifier (like a product code, email, or ID). The function scans down the first column of your specified range, finds the first exact match (or nearest match if sorted), and then pulls a value from a column to the right in that same row.
This is one of the most-used functions in spreadsheet work because it lets you combine data from two tables without manual copying. For instance, you might have a list of order IDs in one sheet and a price list in another; VLOOKUP can bring the price into the order sheet automatically.
VLOOKUP Syntax and Arguments
The full syntax is:
=VLOOKUP(search_key, range, index, [is_sorted])
- search_key – the value to look for (can be a cell reference like A2, or a literal like “A-100”).
- range – the table to search, e.g., A2:C20. The first column of this range is the lookup column.
- index – the column number in the range from which to return a value (1 = first column, 2 = second, etc.).
- is_sorted – optional. Use
FALSEfor an exact match (almost always what you want). UseTRUEor omit it for an approximate match, which requires the first column to be sorted in ascending order.
Example: With product codes in A2:A20 and prices in B2:B20, =VLOOKUP("B-200", A2:B20, 2, FALSE) returns the price for product “B-200”.
How to Use VLOOKUP Step by Step
- Click the cell where you want the result.
- Type
=VLOOKUP(– Google Sheets will show a function helper. - Enter the search key (e.g., click a cell with the ID, or type a value in quotes).
- Enter a comma, then select the range (e.g., A2:C50).
- Enter a comma, then type the column number to return (e.g., 3 for column C).
- Enter a comma, then type
FALSEfor an exact match. - Close the parenthesis and press Enter.
For example, to look up an employee’s department from a table with names in column A and departments in column B, you would write =VLOOKUP("Jane Doe", A2:B10, 2, FALSE).
Exact Match vs. Approximate Match (is_sorted)
The fourth argument is a common source of confusion. Setting it to FALSE forces an exact match – the function returns an error if the search key is not found. This is what you want for IDs, names, or any lookup where the key is unique.
Setting it to TRUE (or leaving it blank) performs an approximate match. It finds the largest value in the first column that is less than or equal to the search key. This is useful for tax brackets, commission rates, or grade boundaries. However, the first column must be sorted in ascending order; otherwise, you’ll get wrong results. For most everyday lookups, always use FALSE.
Common VLOOKUP Errors and How to Fix Them
- #N/A – The search key was not found. Check for typos, extra spaces, or that the key exists in the first column. Use
=IFERROR(VLOOKUP(...), "Not found")to display a friendly message. - #REF! – The index number is greater than the number of columns in the range. For example, if your range is A2:B10 and you ask for column 3, you get this error.
- #VALUE! – The index is less than 1 or the range is invalid.
- Wrong results with TRUE – If you used TRUE but the first column is not sorted, you’ll get incorrect matches. Always sort or use FALSE.
A common pitfall: VLOOKUP cannot look to the left. It only returns values from columns to the right of the first column. If you need to return a value from a column to the left, use INDEX/MATCH or XLOOKUP (if available).
VLOOKUP vs. INDEX/MATCH vs. XLOOKUP
VLOOKUP is simple but has limitations. INDEX/MATCH is more flexible: =INDEX(return_range, MATCH(search_key, lookup_range, 0)). It can look left, and it doesn’t break if you insert a column in the table. However, it’s more verbose.
XLOOKUP is the modern replacement, available in Google Sheets as of 2022. Its syntax is =XLOOKUP(search_key, lookup_range, return_range, [if_not_found]). It handles exact matches by default, can return multiple values, and works with vertical or horizontal data. If you’re starting a new spreadsheet, XLOOKUP is often easier and more powerful.
Example of XLOOKUP: =XLOOKUP("A-100", A2:A20, C2:C20) returns the corresponding value from column C.
Using VLOOKUP Across Different Sheets or Tabs
You can reference another sheet in the same spreadsheet by including the sheet name. For example, =VLOOKUP(A2, 'Price List'!A:B, 2, FALSE) looks in the sheet named “Price List”. If the sheet name has spaces, enclose it in single quotes.
To reference a completely different spreadsheet file, you’d use the IMPORTRANGE function to bring data in first, then VLOOKUP on that imported data. For instance: =VLOOKUP(A2, IMPORTRANGE("https://docs.google.com/spreadsheets/d/abc123", "Sheet1!A:B"), 2, FALSE). Note that IMPORTRANGE requires access permissions and can slow down your sheet.
Frequently Asked Questions
Can VLOOKUP return multiple columns? No, a single VLOOKUP returns one value. To return multiple columns, you’d write separate VLOOKUP formulas for each column, or use XLOOKUP with an array formula like =XLOOKUP(A2, A2:A20, B2:D20) which returns a row of three values (if you use it in a row of cells).
Why is my VLOOKUP returning the wrong value? The most common cause is using TRUE (approximate match) without sorting the first column. Another cause is that the search key is not exactly the same (extra spaces, different data types like text vs. number). Check the data with the TRIM function or use FALSE for exact match.
Can I use VLOOKUP with wildcards? Yes, for exact match mode, you can use wildcards in the search key: * for any sequence of characters and ? for a single character. For example, =VLOOKUP("A*", A2:B10, 2, FALSE) will find the first value in column A that starts with “A”.
Does VLOOKUP work in Excel the same way? Mostly, but there are differences. In Excel, the syntax is identical, but the default is approximate match if you omit the last argument. Also, Excel’s VLOOKUP cannot reference another workbook without it being open. Google Sheets is more forgiving with cross-file references via IMPORTRANGE.
How do I handle case sensitivity? VLOOKUP is not case-sensitive by default. If you need case-sensitive matching, use INDEX/MATCH with the EXACT function: =INDEX(B2:B10, MATCH(TRUE, EXACT(A2:A10, "value"), 0)) – this is an array formula, so press Ctrl+Shift+Enter in Excel, but in Google Sheets it works automatically.
Is there a limit to how large my range can be? Google Sheets can handle up to 10 million cells, but performance may slow down. It’s best to limit your range to the actual data area (e.g., A2:C1000 instead of entire columns) to keep formulas fast.
Related
- PLC Traffic Light Ladder Logic: How It Works
- Makita BTD144 3-Speed Brushless Impact Driver: Full Review
- Python Update Empty Dictionary: 4 Ways & When to Use Each
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Flip Words Upside Down in Excel: 3 Practical MethodsTo flip words upside down in Excel, use upside-down Unicode characters in a formula or paste text from…
- Excel Data Validation Lists: Can They Include Formatting?No. In Excel, a data validation list controls which values users can choose or enter; it does not…
- Excel Column Letters: How to Find or Convert Them EasilyIn Excel, a column letter is the label at the top of a worksheet column: A is the…
- Excel File Size Too Large? How to Reduce ItTo reduce a large Excel file, remove unused rows, columns, formatting, images, and duplicate data, then save a…
- Conditional Formatting in Excel: How It WorksConditional formatting in an Excel spreadsheet automatically changes a cell’s appearance when its value or a formula meets…
- How to Ungroup Rows in Excel With a Keyboard ShortcutTo ungroup rows in Excel for Microsoft 365 on Windows, select the grouped rows by their row numbers,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.