Google Sheets VLOOKUP Function Explained

How-to basics · Updated November 23, 2026

The Google Sheets VLOOKUP function searches down the first column of a range for a key and returns the value of a specified cell in the row found. Its syntax is VLOOKUP(search_key, range, index, [is_sorted]), and you use it when you need to pull matching data from one table into another based on a unique identifier.

What VLOOKUP Does and When to Use It

VLOOKUP stands for “vertical lookup.” It scans the first column of a range you specify, looking for an exact match (or approximate match if you set the last argument to TRUE). When it finds the row, it returns the value from a column you choose in that same row. This is ideal for tasks like: finding a product price by product ID, pulling a student’s grade by their email, or matching employee names to their department codes.

For example, if you have a product list in columns A and B (A2:A10 contains product IDs, B2:B10 contains prices), and you want the price for the ID in cell D2, you would write:

=VLOOKUP(D2, A2:B10, 2, FALSE)

This returns the price from column B for the row where column A matches D2. The FALSE tells Sheets to look for an exact match, which is almost always what you want for IDs or names.

Understanding the Four Arguments

Each part of the VLOOKUP formula has a specific role:

  • search_key – the value you are looking for. It can be a cell reference, a number, or text in quotes.
  • range – the table to search. The first column must contain the search keys. The range can be on the same sheet or a different sheet (e.g., Sheet2!A2:B10).
  • index – the column number in the range from which to return the value. Column 1 is the first column of the range, column 2 is the second, and so on. If you set index to 1, you get the search key itself.
  • is_sorted – either TRUE (approximate match) or FALSE (exact match). If omitted, it defaults to TRUE, which can give wrong results if your data is not sorted ascending. For most lookups, use FALSE.

Exact Match vs. Approximate Match

The fourth argument determines how Sheets finds the key. With FALSE, Sheets looks for an exact match. If it doesn’t find one, it returns a #N/A error. This is the safest choice for most data, especially when the search key is a unique identifier like an email or SKU.

With TRUE, Sheets finds the largest value in the first column that is less than or equal to the search key. This is useful for ranges like tax brackets or shipping tiers, where you want to match a number to a category. However, the first column must be sorted in ascending order for TRUE to work correctly. If it isn’t, you’ll get unreliable results.

Common Errors and How to Fix Them

You will likely see these errors when using VLOOKUP:

  • #N/A – The search key was not found. Check for typos, extra spaces, or number stored as text. Use TRIM() to clean data.
  • #REF! – The index number is greater than the number of columns in the range. For example, if your range is A2:B10 (2 columns), index 3 gives this error.
  • #VALUE! – The index is less than 1, or the range is not valid.
  • Wrong result with TRUE – The first column is not sorted ascending. Switch to FALSE or sort the data.

To handle missing keys gracefully, wrap VLOOKUP in IFERROR:

=IFERROR(VLOOKUP(D2, A2:B10, 2, FALSE), "Not found")

This returns “Not found” instead of an error.

VLOOKUP vs. Other Lookup Functions

Google Sheets offers alternatives that can be better in certain situations:

  • HLOOKUP – searches horizontally across the first row. Use it when your data is laid out in rows instead of columns.
  • INDEX and MATCH – more flexible than VLOOKUP. INDEX returns a value from a range, and MATCH finds the position of a key. Together, they can look up to the left (VLOOKUP can only return columns to the right of the first column) and handle columns that are added or removed.
  • XLOOKUP – available in newer versions of Excel, but in Google Sheets, it does not exist. Instead, use INDEX/MATCH or QUERY for complex lookups.
  • QUERY – a powerful SQL-like function that can join tables and filter data. It’s overkill for simple lookups but useful for advanced scenarios.

For a simple rightward lookup, VLOOKUP is fine. If you need to look to the left or handle dynamic column positions, use INDEX/MATCH.

Real-World Example with Step-by-Step Setup

Suppose you have a sheet named “Orders” with order IDs in column A and customer names in column B. You want to fill in customer names for a list of order IDs in a new sheet. Here’s how:

  1. In the new sheet, put an order ID in cell A2 (e.g., 1001).
  2. In cell B2, enter: =VLOOKUP(A2, Orders!A2:B100, 2, FALSE)
  3. Press Enter. If order 1001 exists in the Orders sheet, you’ll see the customer name.
  4. Drag the formula down to apply it to other rows.

Make sure the range Orders!A2:B100 covers all your data. If you add new orders, expand the range or use a full-column reference like Orders!A:B (but be careful with full columns as they can slow down the sheet).

Frequently Asked Questions

Why is my VLOOKUP returning #N/A even though I see the value?

This usually happens because the search key doesn’t exactly match. Check for leading or trailing spaces, non-printing characters, or number formats. For example, if the search key is a number but the lookup column contains text-formatted numbers, they won’t match. Use TRIM() and TEXT() functions to clean data, or use VLOOKUP with ARRAYFORMULA to handle arrays.

Can VLOOKUP return multiple columns?

No, VLOOKUP returns only one value. To return multiple columns, you can write separate VLOOKUP formulas with different index numbers, or use INDEX and MATCH together. Alternatively, you can use QUERY to pull multiple columns at once.

How do I use VLOOKUP with data on another tab?

Simply include the sheet name in the range, like Sheet2!A2:B10. If the sheet name has spaces, enclose it in single quotes: 'My Sheet'!A2:B10.

Is VLOOKUP case-sensitive?

No, VLOOKUP in Google Sheets is not case-sensitive by default. It treats “apple” and “Apple” as the same. If you need a case-sensitive lookup, you’ll need to use INDEX and MATCH with EXACT or use a helper column.

What’s the difference between VLOOKUP and XLOOKUP?

XLOOKUP is available in Microsoft Excel (2021 or 365) but not in Google Sheets. XLOOKUP can search to the left, return multiple values, and has built-in error handling. In Google Sheets, use INDEX/MATCH or QUERY to achieve similar flexibility.

Tips for Reliable VLOOKUP Use

  • Always use FALSE for exact matches unless you are deliberately doing a range lookup.
  • Keep your lookup table sorted if you use TRUE.
  • Use absolute references (e.g., $A$2:$B$10) when dragging formulas so the range doesn’t shift.
  • If your data has duplicates in the first column, VLOOKUP returns the first match. Ensure your keys are unique if that matters.
  • For large datasets, VLOOKUP can be slow. Consider using QUERY or FILTER for better performance.

VLOOKUP is a foundational function that every spreadsheet user should know. With practice, you’ll be able to combine it with other functions like IFERROR and ARRAYFORMULA to build robust, dynamic reports.

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.