Skip to content

How to Use VLOOKUP in Google Sheets

Person examining a printed table of figures beside a computer.

Use VLOOKUP to find a value in the first column of a range and return a value from the same row. For product IDs, names or other exact keys, set the final argument to FALSE. Leaving it out enables approximate matching, which needs different preparation.

The example below uses invented product data. The lookup finds BK-104 and returns 29 from the third column of A2:C5. These instructions use the computer version of Google Sheets and English formulas with comma separators.

Exact-match VLOOKUP finds BK-104 and returns its price of 29.
Synthetic workbook example. The lookup key is BK-104, the search range is A2:C5, the returned column is 3, and FALSE requests an exact match. Open the full-size image.

Build an exact-match VLOOKUP

Suppose A1:C5 contains headers followed by four products. Column A holds IDs, B holds names, and C holds prices. Put the required ID in F2, then enter this formula in G2:

=VLOOKUP(F2,$A$2:$C$5,3,FALSE)
  • F2 is the key to find.
  • $A$2:$C$5 is the table. The dollar signs keep it fixed when the formula is copied.
  • 3 returns the third column of that table, column C.
  • FALSE requests an exact match rather than a sorted threshold lookup.

Column numbers are relative to the selected range. In B2:D5, index 1 means B and index 3 means D. The search always happens in the range's first column. A range that merely includes the key column somewhere in the middle is not sufficient.

Copy G2 down for more lookups. F2 changes to F3, while the dollar-signed table stays fixed. Increase the table's last row when your source data grows beyond row 5.

Understand the result and common errors

VLOOKUP returns the first matching row, so repeated IDs can produce an unwanted result even when the formula is valid. Check keys with COUNTIF and review duplicate source records before deciding which record should remain. Do not delete legitimate repeated transactions merely because they share a product ID.

Text matching is case-insensitive. In a table containing Smith before smith, an exact lookup for smith can return the first Smith row. FALSE does not make capitalization significant. Leading or trailing spaces and a number stored as text can still prevent the intended match.

  • #N/A: the key was not found in the first column in exact-match mode. Check the key, whitespace, data type and selected column.
  • #REF!: an index greater than the range's width, or a broken reference, can cause this error. A two-column range cannot return column 3.
  • #VALUE!: check that the index is a valid positive number.

If missing keys are expected, use =IFNA(VLOOKUP(F2,$A$2:$C$5,3,FALSE),"Not found"). IFNA handles #N/A while leaving other errors visible. IFERROR catches a broader set of errors, which can conceal a broken formula if used without checking it.

Look up a value on another tab

For a tab named Products, use =VLOOKUP(F2,Products!$A$2:$C$5,3,FALSE). Put single quotes around tab names containing spaces: =VLOOKUP(F2,'Product List'!$A$2:$C$5,3,FALSE). The same first-column and index rules apply.

Use approximate matching only for sorted thresholds

With TRUE, sort the first column in ascending order. A lookup uses an exact threshold when present, otherwise the nearest smaller threshold, and returns the corresponding result column. A key below the smallest threshold returns #N/A.

For an invented grade table with lower bounds 0, 60 and 80 and labels F, Pass and High, a lookup of 75 returns Pass. This is a threshold example, not a substitute for your school's grading policy. Use FALSE for IDs where a neighboring value would be the wrong record.

Choose an alternative when the layout needs it

XLOOKUP is available in Google Sheets. It separates the lookup and result ranges, so the result can be to the left: =XLOOKUP(F2,A2:A5,C2:C5,"Not found"). INDEX with MATCH is another option. If you need a total across several matching rows rather than one returned value, use SUMIF.

Google's VLOOKUP reference covers the arguments and errors. Test one known key, one missing key and any repeated keys before filling a working report.

A marketing example: matching pages to results

A common reporting task is combining two exports that share a page URL. One tab holds Search Console data with clicks and impressions per page, and another holds leads or sales per landing page from your analytics or CRM. A VLOOKUP on the URL brings the leads column into the Search Console tab, so each row shows both visibility and results.

Clean the keys first. URLs must match exactly, so remove tracking parameters, make trailing slashes consistent, and use the same protocol and hostname in both tabs. Wrap the formula in IFERROR to show a blank or a clear label instead of #N/A for pages with no leads; our guide to IFERROR in Google Sheets shows how.

When the same URL appears more than once in the lookup range, VLOOKUP returns only the first match. Remove duplicates first, or total the values with SUMIF instead. Our SEO team builds this kind of combined report for clients, so owners can see which pages bring visitors and which bring business.

Keep the report repeatable. Paste each new export into the same tab and columns every month, and keep the lookup formulas on a separate summary tab. The summary then updates itself, and nobody has to rebuild formulas when the numbers change.

Frequently asked questions

What does FALSE mean in VLOOKUP?

FALSE requests an exact match. It does not require a sorted table or make text matching case-sensitive.

Why does my VLOOKUP return #N/A?

In exact-match mode, the key was not found in the first column of the selected range. Check the key, whitespace, data type and table selection.

Can VLOOKUP return a value from the left?

VLOOKUP returns a column within its range starting from the search column. Use XLOOKUP or INDEX with MATCH when the desired result is to the left of the lookup column.

How do I stop the lookup range moving when I copy the formula?

Use absolute references for the table, such as $A$2:$C$5, while keeping the lookup key relative when it should change for each row.

Want this checked on your own site?

Check one URL in Swiss Knife SEO without an account. A free account supports crawls of up to 100 URLs.

How to Use IFERROR in Google Sheets

Every spreadsheet user has experienced the frustration of a formula gone wrong. You build what you think is a simple calculation, hit Enter, and get a...

Read the guide ›

How to Use SUMIF in Google Sheets

SUMIF is a function that sums values in one range based on a condition in another range. A basic SUM function adds all values in a...

Read the guide ›

How to Use ARRAYFORMULA in Google Sheets

One of the most frustrating tasks in Google Sheets is dragging a formula down hundreds of rows. You copy the formula, select the range, and paste....

Read the guide ›