---
title: "VLOOKUP in Google Sheets: Syntax, Errors and XLOOKUP Alternatives"
description: "Learn vlookup in google sheets with clear steps for syntax, common errors, and XLOOKUP alternatives so you can find data faster and choose the right formula."
url: "https://onlinetoolguides.com/vlookup-in-google-sheets/"
type: "post"
date: "2026-11-24T17:41:14-05:00"
modified: "2026-11-24T17:49:37-05:00"
author: "Marco"
---

# VLOOKUP in Google Sheets: Syntax, Errors and XLOOKUP Alternatives

Part of our [Productivity Tools guides](https://onlinetoolguides.com/productivity-tools/)

[How to Use VLOOKUP in Google Sheets (Pull From Another Sheet)](https://www.youtube.com/embed/mo01d3AO1es?feature=oembed)

Use VLOOKUP in Google Sheets when you need a quick, exact match from a well-structured table. The function searches the first column, then returns related information from the same row. That can save time when you need to pull an employee’s department, a product price, or another value into a report. It also means less manual searching and fewer copy errors.

A search key is the value being searched. An approximate match is a lookup that can return the closest qualifying value instead of requiring an exact match. You will learn how to write a formula, check its result, and choose a different function when your table needs more flexibility. An exact-match setting is the safest starting point for most everyday lookups.

### Key Takeaways

- Put the search key in the range’s first column.
- Set FALSE when you need an exact match.
- Count the return column from the range’s left edge.
- Check spaces and text formats when a match fails.
- Use XLOOKUP when you need to return data from either side.
- Test your formula on a few real rows first.

## What VLOOKUP Searches and Returns

If an employee ID sits in the first column of your selected range, VLOOKUP can return the department from the same row. The _first column_ sets where Google Sheets searches, and the result comes from a column to its right. **The search key must appear in the first column of the chosen range.**

For example, a range might have employee IDs in column A, names in column B, and departments in column C. The VLOOKUP function searches the ID column and returns the department value from that employee’s row. When several rows share one ID, VLOOKUP returns the result from the first matching row.

VLOOKUP cannot return a value from a column to the left of its lookup column. If the department sits left of the ID, move or reshape the range, or choose another function. A clear table layout makes lookups easier to check; see how [Google Sheets compares with Airtable](https://onlinetoolguides.com/airtable-vs-google-sheets/) when your work needs more than a simple list.

Before writing the formula, check that the lookup column is at the left edge of the range.

## VLOOKUP in Google Sheets: Syntax and Arguments

A VLOOKUP formula has four arguments, and each one tells Sheets what to find, where to search, and what to return. The _range edge_ matters because the formula starts its search at the range’s first column. **The syntax is =VLOOKUP(search\_key, range, index, \[is\_sorted\]).**

Formula terms can seem dense at first, but each part has one job. A clear range and a deliberate match setting make the result easier to trust. If you are new to cell references, this guide to [Google Sheets formulas and functions](https://onlinetoolguides.com/google-sheets-formulas-for-beginners/) can help with the basics.

### What Each Argument Controls

The search\_key is the value VLOOKUP should find, such as an employee ID in cell G3. The range is the data area that contains both the key and the result. The index is the numbered return position within that range.

The optional is\_sorted argument sets the match mode. FALSE asks for an exact match, while TRUE asks for an approximate match. When you leave it out, Sheets uses TRUE, so _set it deliberately_ instead of relying on the default.

For a value typed directly into a formula, use quotation marks around text, such as “E1005”. A cell reference such as G3 does not need quotation marks. This small difference can prevent a formula from reading text as a named range.

### How the Column Index Works

The index starts at the range’s left edge, not at column A on the sheet. If your range is B4:D8, column B has index 1, column C has index 2, and column D has index 3. **Index 1 always means the first column of the selected range.**

That count stays the same even if the range starts far across the sheet. For example, if you select F2:H20, column F is index 1, G is index 2, and H is index 3. A return value in H therefore needs an index of 3.

Count the return position from the first column in your selected range, not from the spreadsheet’s column letters.

## Build an Exact-Match VLOOKUP Formula

If G3 contains the value to find, this exact-match formula returns the corresponding result from the third column of B4:D8. The _FALSE setting_ tells Sheets to require the same value, rather than a nearby one. **Use this VLOOKUP in Google Sheets example as a starting point: =VLOOKUP(G3, B4:D8, 3, FALSE).**

Here, G3 holds the search key, B4:D8 is the range, and 3 selects its third column. FALSE sets the match mode to exact. The formula searches the first column in B4:D8, then returns a value from the same row’s third column.

Build and check the formula in five steps:

1. Choose the search key, such as the employee ID in G3.
2. Select a range with that key in its first column.
3. Count the result column from the range’s left edge.
4. Set FALSE to request an exact match.
5. Copy the formula only after checking its result.

When you fill a formula down, Sheets may shift a range reference to the next rows. That can move the search table away from its original data. Add dollar signs to lock its boundaries, as in $B$3:$D$7.

A locked range keeps pointing to the same table while the search key changes from row to row. For example, you can keep G3 relative while fixing $B$3:$D$7. The formula can then check G4 against the same source data after you copy it down.

Lock the range before filling the formula down so its boundaries do not shift.

## Choose Exact or Approximate Matching

For most everyday lookups, choose FALSE because it requires the value to match exactly. The _exact match_ setting suits IDs, names, and other values that should not be guessed. **With FALSE, a missing search key returns #N/A.**

TRUE requests an approximate match, which can return the closest qualifying value. Use it for tiered values, such as a rate band, only when the lookup column is sorted in ascending order. [The sorted-column rule](https://www.benlcollins.com/spreadsheets/vlookup-wildcard/) helps Sheets find the correct lower band.

### Exact Match with FALSE

FALSE is a good match mode when each search key should match one listed value. An employee ID of E1005 should not return the row for E1004 or E1006. If no exact value appears, Sheets returns #N/A instead of choosing a nearby value.

That result can be useful: it shows the key needs attention. The value may be absent, or the data may have extra spaces or a different text format. Check the source values before changing the match mode.

### Approximate Match with TRUE

TRUE works with a sorted lookup column and can help assign a value to a band. For an ascending list, VLOOKUP stops at the first value larger than the search key, then returns the preceding row’s result. **The lookup column must be sorted in ascending order for this behavior.**

For example, a table may list sales thresholds of 0, 1,000, and 5,000. A search key of 3,200 returns the result for the 1,000 threshold. This is useful only if the closest lower band is the right answer.

| Setting | What it does | When to use it |
| --- | --- | --- |
| FALSE | Requires an exact value | IDs, names, and codes |
| TRUE | Returns a qualifying lower value | Sorted bands and thresholds |
| Omitted | Uses TRUE by default | Only when approximate matching is intended |

Use TRUE only when a closest-lower result is correct for the task and the lookup column is sorted ascending.

## Fix Common VLOOKUP Errors

A VLOOKUP error usually points to a missing match, a range mismatch, or an argument that does not fit the data. The _first check_ is whether the key and result sit inside the range you selected. **Do not hide an error until you know what caused it.**

Formula checks often start with a small detail, such as a space at the end of an ID. Google Sheets may treat text and numbers as different values, even when they look alike. A short check of the original data can save time spent editing a sound formula.

### #N/A Means No Match

An exact-match formula returns #N/A when it cannot find the search key. Check that the key exists in the range’s first column, then look for extra spaces. **Text and number formats must match for a reliable lookup.**

A value stored as text may not match the same digits stored as a number. Compare the cells directly and check for spaces before or after the key. If the key is truly missing, a fallback can show a useful message instead.

For example, =IFNA(VLOOKUP(G3, B4:D8, 3, FALSE),”NOT FOUND”) displays NOT FOUND when the lookup returns #N/A. IFNA replaces that specific result, while leaving other formula errors visible.

### #REF! Means the Index Is Too Large

#REF! can mean the index asks for a column outside the selected range. If your range has three columns, an index of 4 cannot return a value. **The index must be at least 1 and no larger than the range’s column count.**

Count the range’s columns again, starting with its leftmost column as 1. A range with columns B, C, and D has three columns, even though D is column 4 on the sheet.

### Other Errors Point to Formula or Data Issues

#VALUE! can point to an index that is not a number or is less than 1. #NAME? may appear when text typed into a formula lacks quotation marks. An unexpected value can come from an approximate lookup on an unsorted column.

The table gives you a quick place to start. Then check the formula and source data, rather than swapping arguments at random. A lookup result only helps when the key, range, and match mode fit the task.

| Result | Likely cause | First check |
| --- | --- | --- |
| #N/A | No exact key found | First column, spaces, and format |
| #REF! | Index exceeds range | Count the selected columns |
| #VALUE! | Index is not valid | Use a number of at least 1 |
| #NAME? | Text lacks quotation marks | Check hardcoded text in formula |
| Unexpected value | Approximate match on unsorted data | Check match mode and sort order |

Use this four-part check before changing the formula:

1. Confirm the range starts with the key column.
2. Compare key formatting and spaces.
3. Recount the index within the selected range.
4. Verify that FALSE or TRUE fits the task.

Check the source values before hiding an error, so a formula does not mask a data problem.

## Find Partial Text with Wildcards

A wildcard lets you match a pattern when you do not know every character in the lookup value. In Google Sheets, VLOOKUP with text can use \* for any sequence of characters or ? for one character. **Wildcard matching requires FALSE as the match mode.**

To find a name that starts with Sam, use “Sam\*” as the search key. The star can stand for any number of characters, including no characters. To match a three-character pattern with one unknown letter, use “S?m”.

These wildcard characters in VLOOKUP can help when a name or code has a known part. A wildcard is not the same as a literal star or question mark. If you need to search for the symbol itself, make sure it is not treated as a pattern character.

VLOOKUP returns the first matching row when several rows fit the pattern. A search for Sam\* could match Sam Lee and Samantha Jones, depending on the text in your range. Check whether the first result is the record you need.

Use the shortest pattern that still points to the intended record, then check for more than one possible match.

## Combine Criteria or Return Several Results

When a name appears more than once, combining it with a second field can make the lookup key more specific. A _helper column_ can join first and last names into one value. **A standard VLOOKUP call returns one value for one search key.**

For example, create a helper column with a formula like =A2&”|”&B2, where A2 holds a first name and B2 holds a last name. The result could be Sam|Lee. Use the same pattern for the search key, then search the helper column.

### Join Criteria in a Helper Column

VLOOKUP does not directly test multiple criteria as separate conditions. A helper column makes them one combined key that the function can search. You can join fields such as first name and last name, or a product code and location.

The separator helps keep different combinations apart. Without it, combinations such as AB and C could look like A and BC after joining. A bar, dash, or another clear symbol makes the combined value easier to read and check.

Keep the helper key in the range’s first column, just like any other search key. Each row should use the same order and separator. A mismatch in the joined text can stop an otherwise sound lookup from finding its result.

### Return More Than One Column

Each VLOOKUP formula returns one value, so separate result columns need separate formulas. One formula might use index 2 for a name, while another uses index 3 for a department. Keep each formula’s search key and range aligned with the same record.

You can also place several formulas in an array to fill multiple result cells. The formulas still need the right index for each return column. This approach can work well when your report needs two or three related values beside one search key.

Separate formulas also make it easier to spot which result column has an issue. A formula that returns a name can work while a second formula points to the wrong index. Check each return position against the range before copying formulas through a large table.

Add a separator between joined fields so different combinations do not collapse into the same key.

## Use VLOOKUP Across Tabs in One Spreadsheet

A VLOOKUP range can point to a different tab in the same spreadsheet by adding the tab name before the cell range. The _tab reference_ uses an exclamation point between the tab name and range. **Google Sheets VLOOKUP can search across tabs in one spreadsheet.**

A tab is one worksheet within a spreadsheet. It is not a separate spreadsheet file. This difference matters because another tab can be referenced directly, while a separate file needs a data connection.

### Reference One Other Tab

A formula can use a range like ‘Highest-grossing-films-US\_1977-2022’!A2:C47. The tab name comes first, followed by an exclamation point and the cell range. [A tab-qualified range](https://www.coursera.org/articles/tutorial-vlookup-google-sheets) tells Sheets where the source data sits.

Use single quotes around a tab name when it contains spaces or special characters. For example, a tab named Sales Data can be referenced as ‘Sales Data’!A2:C47. A simple tab name without spaces may not need quotes.

VLOOKUP in Excel between 2 sheets uses the same basic search\_key, range, index, and match arguments. The sheet reference syntax can differ, but the lookup still searches the first column of its selected range.

### Search a Combined Range from Several Tabs

If several tabs use the same layout, braces can combine their ranges for one lookup. Use semicolons between the tab ranges, as in {‘North’!A2:C20;’South’!A2:C20}. The tabs must place matching fields in the same column order.

For example, each tab could list product codes in column A, names in B, and prices in C. A combined range works only when the columns mean the same thing on each tab. A different order could return a value from the wrong field.

Confirm that each combined tab puts the lookup key in the same first column.

## Import Data from Another Spreadsheet

![A laptop displays a Google Sheets spreadsheet with an IMPORTRANGE formula linking to lookup data in another spreadsheet and a colorful chart. Papers, a coffee mug, and a potted plant sit on the desk, with a suburban neighborhood visible through the window.](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDU4NSIgd2lkdGg9IjEwMjQiIGhlaWdodD0iNTg1IiBkYXRhLXU9Imh0dHBzJTNBJTJGJTJGb25saW5ldG9vbGd1aWRlcy5jb20lMkZ3cC1jb250ZW50JTJGdXBsb2FkcyUyRjIwMjYlMkYxMSUyRmltcG9ydC1kYXRhLWZyb20tYW5vdGhlci1zcHJlYWRzaGVldC0xMDI0eDU4NS5qcGVnIiBkYXRhLXc9IjEwMjQiIGRhdGEtaD0iNTg1IiBkYXRhLWJpcD0iIj48L3N2Zz4= "A laptop displays a Google Sheets spreadsheet with an IMPORTRANGE formula linking to lookup data in another spreadsheet and a colorful chart. Papers, a coffee mug, and a potted plant sit on the desk, with a suburban neighborhood visible through the window.")

_IMPORTRANGE brings lookup data from another spreadsheet into Google Sheets, where it can be used alongside a chart and other data._

For a source stored in a separate spreadsheet, wrap its range in IMPORTRANGE and use that result as the VLOOKUP range. A separate spreadsheet is a different file, not another tab in the same file. **The first connection to an unshared spreadsheet needs access approval.**

IMPORTRANGE uses this form: =IMPORTRANGE(“spreadsheet”,”range\_string”). The spreadsheet argument can be a URL or ID, while the range string names a tab and cell range. Use the imported data as the range for your lookup.

Set up the connection in four steps:

1. Enter IMPORTRANGE with the source spreadsheet’s URL or ID.
2. Type the quoted tab name and cell range as the range string.
3. Approve access when Sheets asks on the first connection.
4. Use the imported range in your VLOOKUP formula.

A range string can look like “Sales Data!A2:C47”. Keep the tab name and cell range together inside quotation marks. The URL or ID points to the file, while the range string points to data inside it.

IMPORTRANGE can also support reports that pull data from a source file. If your team needs scheduled updates or broader spreadsheet tasks, see this guide to [Google Sheets automation with Apps Script](https://onlinetoolguides.com/google-sheets-automation-with-apps-script/).

Click Allow access the first time the connection requests permission, or the imported data will not load.

## Use HLOOKUP for Row-Based Data

Choose HLOOKUP when your lookup keys run across the first row instead of down the first column. HLOOKUP searches horizontally, while VLOOKUP searches vertically. **HLOOKUP’s index counts result rows, not result columns.**

For example, a sales table might list January, February, and March across its top row. A lower row could hold sales values for each month. HLOOKUP finds the month in the top row and returns a value from the chosen row below.

If the month row is the first row of the range, the row beneath it has index 2. The next row has index 3. HLOOKUP uses that index to choose the result row, just as VLOOKUP uses its index to choose a result column.

HLOOKUP can also use FALSE to request an exact match. That setting helps when a month name must match the heading exactly. The function’s direction is the main choice: keys across a row call for HLOOKUP, while keys down a column call for VLOOKUP.

Use the function that matches the direction of your table so the index counts toward the intended result.

## Combine IF and VLOOKUP for Conditional Results

Nest IF inside VLOOKUP when a cell value should decide which data range the formula searches. For example, a year cell can choose a current price table or a historical price table. **IF selects the range before VLOOKUP searches it.**

A generic formula could use =VLOOKUP(A2, IF(B2=2025, CurrentPrices, PastPrices), 2, FALSE). Here, B2 holds the year, and IF chooses CurrentPrices or PastPrices. VLOOKUP then searches the selected range for the key in A2.

The condition should match how your business stores its data. A year, region, or account type could point to a different lookup table. Make sure both possible ranges use the same column layout so the index returns the same kind of result.

IFNA and IFERROR do a different job. They replace an error with a chosen value, rather than picking a table. For example, =IFNA(VLOOKUP(A2, CurrentPrices, 2, FALSE),”No price”) shows No price when no exact match exists.

[IFNA and IFERROR](https://www.benlcollins.com/spreadsheets/formula-parse-error/) can make a report easier to read, but a fallback can hide a missing source value. Use a clear message that tells you what the result means.

Use IF for a real condition and IFNA or IFERROR only when you want a fallback for an error.

## When XLOOKUP or INDEX MATCH Fits Better

![A laptop displays side-by-side spreadsheets comparing VLOOKUP’s lookup and result columns with XLOOKUP’s features. A notebook, colorful pens, and coffee sit on the desk, with a plant and framed pictures in the home office behind it.](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDU4NSIgd2lkdGg9IjEwMjQiIGhlaWdodD0iNTg1IiBkYXRhLXU9Imh0dHBzJTNBJTJGJTJGb25saW5ldG9vbGd1aWRlcy5jb20lMkZ3cC1jb250ZW50JTJGdXBsb2FkcyUyRjIwMjYlMkYxMSUyRndoZW4teGxvb2t1cC1vci1pbmRleC1tYXRjaC1maXRzLWJldHRlci0xMDI0eDU4NS5qcGVnIiBkYXRhLXc9IjEwMjQiIGRhdGEtaD0iNTg1IiBkYXRhLWJpcD0iIj48L3N2Zz4= "A laptop displays side-by-side spreadsheets comparing VLOOKUP’s lookup and result columns with XLOOKUP’s features. A notebook, colorful pens, and coffee sit on the desk, with a plant and framed pictures in the home office behind it.")

_XLOOKUP or INDEX MATCH can be a better fit when VLOOKUP’s lookup and result columns are limiting, as the side-by-side spreadsheets illustrate._

XLOOKUP is usually the more flexible choice when a lookup must return a value from either side of its key. It uses separate lookup and result ranges, so the key does not need to sit at the range’s left edge. _Choose by table layout_, not by habit.

XLOOKUP is the closest modern equivalent to VLOOKUP for flexible lookups. Google Sheets added XLOOKUP in August 2022. **VLOOKUP still fits simple tables where the return column sits to the right.**

### XLOOKUP Uses Separate Lookup and Result Ranges

The XLOOKUP syntax is XLOOKUP(search\_key, lookup\_range, result\_range, missing\_value, match\_mode, search\_mode). The final three arguments are optional. The lookup and result ranges must be compatible single rows or columns with the same size.

For example, a lookup range might contain product IDs in A2:A50, while the result range holds prices in D2:D50. XLOOKUP can match an ID in the first range and return its price from the second. The ranges do not need to sit side by side.

XLOOKUP defaults to an exact match. Its missing\_value argument can show a custom message instead of the default #N/A result. That can make a report clearer when a key is not found, though the message should not hide a data issue.

### XLOOKUP Can Search in Either Direction

XLOOKUP can return a value from a column to the left or right of its lookup column. Its default search mode checks from first to last, while search mode -1 checks from last to first. A reverse search can return the latest matching record when rows are ordered by time.

The match\_mode argument controls what counts as a match. Mode 0 means exact, 1 allows an exact or next greater value, -1 allows an exact or next lesser value, and 2 uses wildcards. XLOOKUP’s default is exact matching.

Search modes 2 and -2 use binary search and require sorted data. Mode 2 needs ascending order, while mode -2 needs descending order. A wrong sort order can give an incorrect result, so use these modes only when the data order is known.

### INDEX MATCH Avoids a Fixed Column Number

INDEX MATCH is another option when you want separate lookup and return ranges without XLOOKUP. This formula finds E1005 in column A, then returns the value from column G on the matching row: =INDEX(G:G, MATCH(“E1005”, A:A, 0)).

MATCH finds the position of the key, while INDEX returns the value at that position. The formula can return from a column to the left because the search and result columns are separate. The zero in MATCH requests an exact match.

| Function | Lookup layout | Match behavior | Useful when |
| --- | --- | --- | --- |
| VLOOKUP | Key at range’s left edge | Exact or approximate | Simple left-to-right tables |
| XLOOKUP | Separate lookup and result ranges | Exact by default; other modes available | Flexible direction or search order |
| INDEX MATCH | Separate result and lookup ranges | Exact with MATCH mode 0 | You need flexibility without XLOOKUP |

Keep VLOOKUP for simple left-to-right tables, and switch when your layout or return direction calls for a more flexible formula.

## Conclusion

Start with an exact-match VLOOKUP when your key sits in the first column and your table runs in the direction the formula expects. Set FALSE for a typical lookup, then check that the range includes the right result column. _That simple check_ can prevent a plausible but incorrect result.

A formula should match the way your data is arranged. If the key is not at the range’s left edge, another lookup function may fit better. **Test the formula on a small set of real rows before using it in a working report.**

Test one real lookup before filling the formula down your full data set.

## FAQ

### Does VLOOKUP work between sheets?

Yes, VLOOKUP can reference another tab in the same spreadsheet. Add the tab name, an exclamation point, and the cell range to the formula. For example, ‘Sales Data’!A2:C47 points to that range on the Sales Data tab. A different spreadsheet file needs a separate import connection, not just a tab reference.

### Why isn’t my VLOOKUP function working in Google Sheets?

Check that the key is in the range’s first column and that the index fits the range. Spaces or text formatting can also stop a match, even when two values look alike. Confirm the match setting too, since TRUE can return an approximate result. Test one known key and compare its source cells before changing the formula.

### How does VLOOKUP work in Excel?

VLOOKUP in Excel searches the first column of the selected range and returns a value from the indexed column in the same row. Use FALSE when you need an exact match. The same basic lookup logic applies in Google Sheets, though references to tabs or files can use different syntax. Keep the search key at the range’s left edge.

### Can I do a VLOOKUP on Google Sheets?

Yes, VLOOKUP is a built-in Google Sheets function. Its syntax is =VLOOKUP(search\_key, range, index, \[is\_sorted\]). The search key is the value to find, and the range holds both the key and result. The index counts the return column from the range’s left edge, while is\_sorted sets the match behavior.

### Is there a better option than VLOOKUP?

XLOOKUP is more flexible when the result sits left of the lookup key or uses a separate range. VLOOKUP remains simple for a left-to-right table and familiar formulas. INDEX MATCH can also use separate lookup and return ranges. Pick the function that fits your data layout, then test it with a key whose result you know.

### How to use VLOOKUP from Excel to Google Sheets?

The basic four VLOOKUP arguments carry over from Excel to Google Sheets. Check that the range starts with the lookup key, and use FALSE for an exact match. If the source is a separate spreadsheet file, use IMPORTRANGE and approve access the first time. A workbook tab copied into the same spreadsheet can use a tab reference instead.

### Which is better, VLOOKUP or XLOOKUP?

XLOOKUP is better for flexible lookups and defaults to exact matching. It can return from either side of its lookup key and can search in reverse. VLOOKUP is a good fit for a simple left-to-right range and familiar formulas. Use the one that matches your table, especially the position of the return column.

**Keep reading**

- [XLOOKUP vs VLOOKUP: Which Excel Function Should You Use?](https://onlinetoolguides.com/xlookup-vs-vlookup/)
- [Advanced Data Analysis in Excel: Pivot, Power Query and What-If](https://onlinetoolguides.com/excel-advanced-data-analysis/)
- [Airtable vs Google Sheets: When a Spreadsheet Isn’t Enough](https://onlinetoolguides.com/airtable-vs-google-sheets/)

More in [Productivity Tools](https://onlinetoolguides.com/productivity-tools/) · [All guides](https://onlinetoolguides.com/guides/)
