VLOOKUP in Google Sheets: How to Use It Correctly

How-to basics · Updated November 23, 2026

The VLOOKUP function in Google Sheets looks up a value in the first column of a range and returns a matching value from another column in the same row. The basic syntax is =VLOOKUP(search_key, range, index, [is_sorted]), for example =VLOOKUP("Apple", A2:C10, 2, FALSE) returns the value in column B for the row where column A contains “Apple”.

What VLOOKUP Actually Does

VLOOKUP stands for “vertical lookup.” It searches down the first column of a specified range for a key you provide. When it finds that key, it returns the cell content from a column you choose, at the same row. It only works when your search key is in the leftmost column of the range—that is a hard limitation. If your key is in column C and you want data from column A, VLOOKUP cannot do it directly; you would need to rearrange columns or use INDEX/MATCH instead.

The function has four arguments, and the fourth one is the most misunderstood. The [is_sorted] argument expects either TRUE or FALSE. Use FALSE for exact matches, which is what you want in nearly every real-world spreadsheet. Use TRUE only when your first column is sorted ascending and you want the closest match that is less than or equal to the search key—this is rare and often causes wrong results if used accidentally.

Exact vs. Approximate Match

If you omit the fourth argument, Google Sheets defaults to TRUE (approximate match). This is a common source of errors. For example, with a list of employee IDs in column A and names in column B, =VLOOKUP(1042, A2:B100, 2) without FALSE will not require an exact ID match. It may return the name for ID 1040 if 1042 is not present, because the data is sorted and it grabs the closest smaller value. Always include FALSE unless you specifically need approximate matching for things like tax brackets or discount tiers.

For approximate match to work correctly, your first column must be sorted from smallest to largest (or A to Z for text). If it is not sorted, the result is unpredictable. In practice, use FALSE for almost everything.

How to Write a VLOOKUP Formula

Here is a step-by-step example. Suppose you have a product list:

  • A2:A20 contains product codes like “P100”, “P101”, etc.
  • B2:B20 contains product names.
  • C2:C20 contains prices.

To get the price for product code “P105”, you would write in cell E2:

=VLOOKUP("P105", A2:C20, 3, FALSE)

This searches for the exact text “P105” in A2:A20, then returns the value from the 3rd column (C) of the range, which is the price. If the product code is in cell D2 instead of hardcoded, use =VLOOKUP(D2, A2:C20, 3, FALSE).

If the code is not found, the formula returns #N/A. To handle that gracefully, wrap it in IFERROR: =IFERROR(VLOOKUP(D2, A2:C20, 3, FALSE), "Not found").

Common Errors and How to Fix Them

Several errors appear frequently with VLOOKUP:

  • #N/A – The search key is not in the first column, or you used FALSE and there is no exact match. Check for extra spaces or different data types (text vs. number).
  • #REF! – The index number is greater than the number of columns in the range. For A2:C20, the max index is 3.
  • #VALUE! – The index is less than 1, or the range is not valid.
  • Wrong data returned – Usually because you omitted FALSE or your first column is not sorted when using TRUE.

Another common issue: numbers stored as text. If your IDs are numbers but formatted as text, VLOOKUP will not match a numeric search key. Use =VLOOKUP(TEXT(D2,"0"), A2:C20, 3, FALSE) or convert the data with the VALUE function.

VLOOKUP vs. INDEX/MATCH vs. XLOOKUP

VLOOKUP is the easiest to learn, but it has limitations. INDEX/MATCH is more flexible because it can look left, and it does not break if you insert a column in the middle of the range. The syntax is =INDEX(return_range, MATCH(search_key, lookup_range, 0)). For example, to get the price from C2:C20 where the code is in A2:A20: =INDEX(C2:C20, MATCH("P105", A2:A20, 0)).

Google Sheets also has XLOOKUP (added in 2022), which is even simpler: =XLOOKUP("P105", A2:A20, C2:C20). It defaults to exact match, can return multiple values, and supports a not-found message as a fourth argument. If you are starting a new spreadsheet, XLOOKUP is often the better choice. However, VLOOKUP remains widely used because it works in older files and many people know it.

For the web version of Google Sheets, all three functions work. In Microsoft Excel, XLOOKUP requires Excel 2021 or Microsoft 365; older Excel versions only have VLOOKUP and INDEX/MATCH.

Using VLOOKUP with Another Sheet

To look up data from a different sheet, include the sheet name in the range. For example, if your product list is on a sheet named “Inventory”:

=VLOOKUP(D2, Inventory!A2:C20, 3, FALSE)

If the sheet name has spaces, put it in single quotes: ='Product Data'!A2:C20. You can also use a named range for clarity, such as =VLOOKUP(D2, ProductList, 3, FALSE) where ProductList is defined via Data > Named ranges.

Sorting and Performance Tips

VLOOKUP with FALSE performs a linear search—it checks each row until it finds a match. On small sheets (under a few thousand rows), this is instant. On very large sheets (hundreds of thousands of rows), it can slow down. If performance matters, consider using XLOOKUP or INDEX/MATCH, which are optimized, or sort your data and use TRUE—but only if you understand approximate matching.

Another tip: avoid using full-column references like A:C because they force the function to scan 1,000,000 rows. Use a specific range like A2:C2000 instead. This reduces calculation time and avoids accidentally including header rows if you start at row 1.

Frequently Asked Questions

Why is my VLOOKUP returning #N/A even though the value exists?
Most likely a mismatch in data type or hidden characters. Check if the search key is a number but the lookup column contains text (or vice versa). Use the TRIM function to remove extra spaces: =VLOOKUP(TRIM(D2), A2:C20, 3, FALSE). Also verify that the search key is in the first column of your range—not the second or third.

Can VLOOKUP return multiple columns at once?
No, a single VLOOKUP returns one value. To get multiple columns, write separate VLOOKUP formulas for each column index, or use XLOOKUP with an array return, or use INDEX/MATCH with an array. For example, to get both name and price, you would need two formulas: one with index 2 and one with index 3.

Does VLOOKUP work with wildcards?
Yes, when using FALSE, you can use wildcards in the search key. The tilde (~) escapes a literal wildcard. For instance, =VLOOKUP("P10*", A2:C20, 2, FALSE) finds the first code starting with “P10”. The asterisk matches any sequence, and the question mark matches a single character.

What is the difference between VLOOKUP and HLOOKUP?
HLOOKUP searches horizontally—it looks for a key in the first row and returns a value from a lower row in the same column. VLOOKUP searches vertically. In Google Sheets, HLOOKUP is rarely used because most data is arranged in columns, but it exists for legacy compatibility.

Is VLOOKUP case-sensitive?
No, VLOOKUP is not case-sensitive by default. =VLOOKUP("apple", A2:C20, 2, FALSE) will match “Apple”, “APPLE”, or “apple”. If you need case-sensitive lookup, use INDEX/MATCH with the EXACT function: =INDEX(B2:B20, MATCH(TRUE, EXACT(A2:A20, D2), 0)).

Can I use VLOOKUP to return a value from a column to the left?
No. VLOOKUP only looks to the right because it searches the first column. To return a value from a column left of the search column, use INDEX/MATCH or XLOOKUP. For example, if your search key is in column B and you want a value from column A, use =INDEX(A2:A20, MATCH(D2, B2:B20, 0)).

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

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

Spotted an error in this guide? Let us know.