VLOOKUP in Google Sheets: Syntax and How to Use It
In this article
VLOOKUP in Google Sheets finds a value in the first column of a range and returns a value from a column to its right. The syntax is =VLOOKUP(search_key, range, index, [is_sorted]), and the quickest working version for an exact match looks like =VLOOKUP(A2, Sheet2!A:C, 3, FALSE). That formula takes the value in A2, looks for it down column A of Sheet2, and returns whatever sits in column C on the matching row. Everything below explains each argument, how to build the formula without breaking it, and what to do when you get #N/A or the wrong row back.
What You'll Need
- A Google account with access to Google Sheets (the free web and mobile versions are enough).
- A spreadsheet with a lookup table: the value you want to match must be in the leftmost column of the range you select.
- A column of search values to look up, such as a list of product codes or employee IDs.
- Basic familiarity with cell references (A2, B2:B100) and sheet names.
Step-by-Step
- Open your spreadsheet and pick the output cell. Click the cell where the looked-up result should appear. This is usually on a summary sheet or in a blank column beside your list of search values.
- Type the start of the formula. Enter
=VLOOKUP(. Google Sheets will show a tooltip listing the four arguments as you type. Menu labels and tooltips can differ slightly by version, device and region, but the function name and argument order are the same everywhere. - Enter the search_key. This is the value to find, usually a cell reference such as
A2. Type it, or click the cell. Do not type the value in quotes unless it is genuinely a text string you want hard-coded, like"SKU-104". - Select the range. Type a range such as
Products!A2:D100, or click the first cell of the lookup table and drag to the last. Two rules matter here: the search column must be the first column of the range, and the range should be wide enough to include the column you want to return. Including the header row is usually a mistake because the header text will never match a real search value. - Set the index. This is a number counting from the left edge of your range, starting at 1. If your range is A2:D100 and you want the value in column C, the index is 3 (A=1, B=2, C=3, D=4). The index is not the spreadsheet column letter, which is the single most common source of wrong results.
- Choose exact or approximate matching. For most real work use
FALSE(or0) for an exact match. UseTRUE(or1) only for sorted numeric bands, such as tax brackets or grade thresholds. If you leave the fourth argument out, Google Sheets assumes TRUE, which is why unexplained wrong answers often trace back to a missing fourth argument. - Close the bracket and press Enter. The full formula might read
=VLOOKUP(A2, Products!A2:D100, 3, FALSE). The result appears in the cell. - Copy the formula down. Drag the fill handle (the small square at the bottom-right of the selected cell) down the column, or copy and paste. If you plan to copy across columns, consider locking the range with dollar signs, for example
Products!$A$2:$D$100, so it does not shift. - Check a few results by eye. Pick two or three search values, find them manually in the lookup table, and confirm the returned values match. This catches index errors before the formula spreads through a whole report.
Common Mistakes
- Counting the index from column A of the sheet instead of the range. If the range starts at column B, then B is index 1, not 2.
- Leaving out the fourth argument. The default is approximate matching, which can return a nearby row rather than the exact one. Always type FALSE for exact lookups.
- Searching a column that is not the first column of the range. VLOOKUP cannot look to the left. If the return column sits left of the search column, restructure the table or use INDEX and MATCH instead.
- Mismatched data types. A number stored as text (often imported from CSV) will not match a real number. Watch for cells with a leading apostrophe or left-aligned numbers in a numeric column.
- Hidden spaces. Trailing spaces in either the search value or the table break exact matches. TRIM can clean up values that came from elsewhere.
- Ranges that stop too early. If new rows are added below the range, they are invisible to the formula. Select a generous range or use an open-ended reference such as
Products!A2:D.
Tips
- Use
IFERRORaround the formula, for example=IFERROR(VLOOKUP(A2, Products!A2:D100, 3, FALSE), "Not found"), to replace ugly #N/A errors with a readable label. - Name your lookup range (Data > Named ranges) so formulas read as
VLOOKUP(A2, PriceList, 3, FALSE)and are easier to audit. - Keep the search column free of duplicates. VLOOKUP returns the first match it finds, so duplicates silently hide later rows.
- For lookups that need to go left, or that must survive column insertions, use
INDEXwithMATCHorXLOOKUPwhere available. - Sort your table if you are using approximate matching; TRUE assumes ascending order and gives unreliable results on unsorted data.
Troubleshooting
If the formula returns #N/A, the search value was not found. Check for extra spaces, number-versus-text mismatches, and whether the value really exists in the first column of the range. A quick test is to search the table manually with Ctrl+F (Cmd+F on Mac).
If you get #REF!, the index number is larger than the number of columns in the range. Count the columns again from the left edge of the selected range.
If you get #VALUE!, the index is not a number, or the range reference is malformed. Check for a stray comma or a missing sheet name.
If the formula returns the wrong row's data, the fourth argument is probably missing or set to TRUE. Change it to FALSE and recheck.
If the result is blank when it should not be, the matching cell in the return column may genuinely be empty, or the range may be pointing at the wrong sheet. Click the range reference in the formula bar and confirm Sheets highlights the intended cells.
If nothing works, simplify: put the lookup table on the same sheet temporarily, use a short range, and test with a single known value. Once that returns correctly, move the range back to the other sheet.
Frequently Asked Questions
What does the fourth argument in VLOOKUP do?
It controls matching. FALSE (or 0) means exact match, which is what you want for IDs, names and codes. TRUE (or 1) means approximate match and assumes the first column is sorted ascending.
Can VLOOKUP look to the left?
No. It only returns values to the right of the search column. To look left, rearrange the table or use INDEX and MATCH.
Why does VLOOKUP return #N/A when the value is clearly there?
Usually a data type mismatch or a hidden space. Numbers stored as text will not match real numbers, and trailing spaces break exact matches.
Is VLOOKUP case-sensitive?
No. It treats uppercase and lowercase text as the same. For case-sensitive matching you need a different approach, such as combining ARRAYFORMULA with EXACT.
What happens if there are duplicate values in the search column?
VLOOKUP returns the first match from the top of the range and ignores the rest, which can produce misleading results.
Does VLOOKUP work across different sheets and files?
Across sheets in the same file, yes, using a reference like Sheet2!A2:D100. Across separate files, use IMPORTRANGE to pull the data into the current file first, then run VLOOKUP on that imported range.