Google Sheets VLOOKUP Example: Step-by-Step Guide
In this article
VLOOKUP in Google Sheets finds a value in the first column of a table and returns a matching value from another column in the same row. The quickest working example: put a product name in cell A2, a price in B2, then in another cell enter =VLOOKUP("Widget", A2:B10, 2, FALSE) to return the price for "Widget". The four parts are the search key, the table range, the column number to return, and FALSE for an exact match. This guide walks through a real example, the syntax, and what to do when you get #N/A or the wrong value.
What You'll Need
- A Google account with access to Google Sheets (sheets.google.com or the Sheets app).
- A spreadsheet with at least two columns of data: one to search in (the leftmost column of your range) and one to return.
- Basic familiarity with typing formulas and pressing Enter.
Menu labels and formula behaviour can differ slightly by version, device and region, but VLOOKUP syntax is the same on desktop and mobile.
Step-by-Step
- Set up your data. In columns A and B, enter a small table. For example: A1 = "Product", B1 = "Price"; A2 = "Widget", B2 = 9.99; A3 = "Gadget", B3 = 14.50; A4 = "Gizmo", B4 = 7.25. The column you search (Product) must be the leftmost column of the range you will use.
- Pick a cell for the result. Click D2 (or any empty cell) where the answer should appear.
- Type the formula. Enter
=VLOOKUP("Gadget", A2:B4, 2, FALSE)and press Enter. This searches for "Gadget" in column A and returns the value from column 2 of the range (column B), which is 14.50. - Use a cell reference instead of typed text. For a reusable lookup, put the search term in D1 (for example "Gizmo") and use
=VLOOKUP(D1, A2:B4, 2, FALSE). Change D1 and the result updates automatically. - Lock the range if you will copy the formula. Change A2:B4 to $A$2:$B$4 so the table range does not shift when you drag the formula down. The dollar signs make the reference absolute.
- Copy the formula down. Drag the fill handle (the small square at the bottom-right of the cell) down to apply the same lookup to other search terms in column D.
- Check the result. The returned value should match the row where the search term was found. If you see #N/A, the term was not found in the first column of the range. If you see #REF!, the column number is larger than the number of columns in the range.
- Handle errors gracefully (optional). Wrap the formula in IFERROR to show a blank or message instead of an error:
=IFERROR(VLOOKUP(D1, $A$2:$B$4, 2, FALSE), "Not found").
Common Mistakes
- Searching a column that is not first in the range. VLOOKUP only looks in the leftmost column of the range you give it. If your search column is to the right of the return column, VLOOKUP will not work; use INDEX/MATCH or XLOOKUP instead, or rearrange the data.
- Using TRUE or omitting the fourth argument. TRUE (or leaving it out) performs an approximate match, which can return the wrong row on unsorted data. Use FALSE for exact matches unless you specifically need a range lookup.
- Forgetting absolute references. Copying a formula with a relative range like A2:B4 will shift the range and return wrong values or errors. Use $A$2:$B$4.
- Mismatched data types. A number stored as text will not match a numeric lookup value. Check for leading apostrophes or text formatting.
- Extra spaces. "Widget " with a trailing space will not match "Widget". Use TRIM on the lookup value or clean the source data.
- Column number off by one. The column number counts from the first column of the range, not from column A of the sheet. If your range starts at B, then B is column 1.
Tips
- Use XLOOKUP if your version of Sheets supports it; it can search in any direction and does not need a column number. VLOOKUP remains useful for older sheets and simple left-to-right lookups.
- Keep the lookup table on the same sheet or reference it with a sheet name, for example
Sheet2!$A$2:$B$100. - Name your range (Data > Named ranges) and use the name in the formula for readability.
- Sort your lookup column alphabetically only if you use approximate match; exact match does not require sorting.
- Use ARRAYFORMULA to apply a VLOOKUP to an entire column at once, but test on a small range first.
Troubleshooting
If the formula returns #N/A, first confirm the search term exists exactly in the first column of the range, including case and spacing. VLOOKUP is not case-sensitive, but it is space-sensitive. Check that the range includes the row you expect. If you see #REF!, reduce the column number to fit within the range. If the result is wrong, confirm the fourth argument is FALSE and the range is locked with dollar signs. If the formula shows as text instead of calculating, the cell may be formatted as plain text; set it to Automatic (Format > Number > Automatic) and re-enter the formula. On mobile, the same syntax works, but tapping the formula bar and using the keyboard is easier than dragging. If nothing works, copy the formula to a new cell and rebuild it one argument at a time.
Frequently Asked Questions
What does the fourth argument in VLOOKUP do?
It sets match type. FALSE (or 0) means exact match, which is what most lookups need. TRUE (or 1) means approximate match and requires the first column to be sorted ascending.
Can VLOOKUP look to the left?
No. VLOOKUP only searches the leftmost column of the range and returns values to its right. Use INDEX/MATCH or XLOOKUP to look left.
Why does VLOOKUP return the wrong value?
The most common causes are an unlocked range that shifted when copied, a column number that does not match the range, or approximate match being used on unsorted data.
Does VLOOKUP work across different sheets?
Yes. Reference the other sheet in the range, for example Sheet2!$A$2:$B$100. The sheet name must be included before the exclamation mark.
Is VLOOKUP case-sensitive?
No. It treats "widget" and "Widget" as the same. For case-sensitive lookups, use a combination of functions such as INDEX, MATCH and EXACT.
What is the difference between VLOOKUP and XLOOKUP?
XLOOKUP can search in any direction, returns a range instead of a column number, and handles missing values more cleanly. VLOOKUP is older and simpler but limited to left-to-right lookups.