9sBlog

How to Do a VLOOKUP in Google Sheets

VLOOKUP in Google Sheets, with the exact syntax and a working example. Plus how to pull from another sheet, fix #N/A, and when to use XLOOKUP instead.

A laptop showing a spreadsheet on a desk

VLOOKUP in Google Sheets finds a value in the first column of a range and returns a value from another column in the same row. The syntax is =VLOOKUP(search_key, range, index, [is_sorted]), and the piece that trips everyone up is the last argument — type FALSE for an exact match, every time.

The syntax, one piece at a time

Type =VLOOKUP( in a cell, then fill the four parts: search_key is the value you are looking for (a cell like A2), range is the block that holds both the lookup column and the answer column (like D:F), index is which column of that range to return counting the first as 1, and is_sorted should be FALSE for an exact match. VLOOKUP only searches the first column of the range, so the value you look up has to sit there.

ArgumentWhat it is
search_keyThe value to find (e.g. A2)
rangeThe block to search; column 1 is the lookup column
indexWhich column to return, counting from 1
is_sortedFALSE for an exact match (use this)

A working example

Say names are in column D and phone numbers in column E, and you want the number for the name in A2: =VLOOKUP(A2, D:E, 2, FALSE). The 2 returns the second column of the D:E range (the number), and FALSE forces an exact match, so a typo returns an error instead of a wrong neighbor. Lock the range with dollar signs — $D$2:$E$100 — before copying the formula down a column.

VLOOKUP is worth learning because it appears in nearly every shared sheet, even as XLOOKUP takes over new work. Type FALSE as the last argument and lock the range with $ before copying, and most errors never happen. For related spreadsheet tasks, see comparing two columns and building a drop-down list.

Common questions

How do I VLOOKUP from another sheet?

Put the tab name and an exclamation point before the range: =VLOOKUP(A2, Sheet2!A:B, 2, FALSE). If the tab name has spaces, wrap it in single quotes, like 'Price List'!A:B. To pull from a different spreadsheet entirely, nest IMPORTRANGE: =VLOOKUP(A2, IMPORTRANGE("url","Sheet1!A:B"), 2, FALSE), and click Allow access the first time.

Why does VLOOKUP return #N/A?

It means no exact match was found — usually a stray space, a number stored as text, or a value that is not in the range’s first column. Wrap it for a clean message with =IFNA(VLOOKUP(A2,D:F,2,FALSE),"Not found"), and use TRIM() to strip spaces.

Should I use TRUE or FALSE for is_sorted?

FALSE for almost everything — it is an exact match. Use TRUE only for range lookups like tax brackets or grade bands, and only when the first column is sorted ascending; otherwise TRUE returns wrong values silently. Leaving it blank defaults to TRUE, a common cause of bad results.

Should I use XLOOKUP instead?

For new sheets, often yes. XLOOKUP is now built into Google Sheets, returns an exact match by default, and can look left as well as right. VLOOKUP is still fine and more widely recognized, so it is worth knowing both — the same is true of Excel’s VLOOKUP.

Discussion

    Leave a comment