How to Use VLOOKUP in Google Sheets: A Step-by-Step Guide
In this article
VLOOKUP (Vertical Lookup) is a powerful function in Google Sheets that allows you to search for a specific value in the first column of a table and return a corresponding value from another column in the same row. This is essential for merging data, finding prices, or looking up employee details without manually scanning rows. To use it effectively, you need two things: a source dataset containing your lookup values and results, and a target cell where you want the result to appear.
What You'll Need
- A Google Sheets document with at least one table of data.
- The lookup value (the item you are searching for).
- The range of cells containing your source data.
- The column index number indicating which column contains the result you want.
Step-by-Step
- Identify your data structure: Ensure your source data is organized in columns. The value you are searching for must be in the leftmost column of your selected range. For example, if you are looking up an ID to find a Name, the IDs must be in Column A and Names in Column B.
- Select the destination cell: Click on the cell where you want the VLOOKUP result to appear. Type
=VLOOKUP(to start the formula. - Enter the search key: Inside the parentheses, enter the value you want to look up. This can be a direct text string (e.g., "101") or a cell reference (e.g., E2). If using a cell reference, ensure it contains the exact value you are searching for. Add a comma after this argument.
- Define the table array: Highlight the entire range of your source data. This range must include the column with the search key and all subsequent columns from which you might retrieve data. For example, if your data is in A1:B100, select A1:B100. It is best practice to lock this range by adding dollar signs (e.g., $A$1:$B$100) so the reference does not shift when you copy the formula down. Add a comma.
- Specify the column index number: Enter the number of the column within your table array that contains the value you want to return. Counting starts at 1 for the first column in your range. If your range is A:C and you want the value from C, the index is 3. Add a comma.
- Set the match type: Enter
FALSE(or 0) for an exact match. This is the most common setting for unique identifiers like IDs or names. If you leave this blank or set it to TRUE, Google Sheets assumes the data is sorted and looks for an approximate match, which often leads to incorrect results. Close the parenthesis and press Enter. - Verify the result: Check that the returned value matches the expected data from the source table. If correct, you can drag the fill handle (the small square at the bottom-right of the cell) down to apply the formula to other rows.
Common Mistakes
One frequent error is placing the lookup column to the right of the result column. VLOOKUP only searches to the right; it cannot look left. If your IDs are in Column B and Names in Column A, VLOOKUP will fail. Another common issue is forgetting to lock the table array with absolute references ($). When copying the formula down, relative references shift, causing the formula to look in empty cells or wrong ranges. Finally, mismatched data types cause failures. If your lookup value is stored as text (e.g., "101") but your source data is numeric (101), the exact match will fail because they are technically different values.
Tips
Use IFERROR to clean up your sheet. Wrap your VLOOKUP formula in an IFERROR function like =IFERROR(VLOOKUP(...), "Not Found"). This prevents #N/A errors from cluttering your report when a value doesn't exist. Consider using XLOOKUP if available in your version of Google Sheets, as it offers more flexibility and defaults to exact matches. Always double-check that your source data has no duplicate keys if you expect a single unique result, as VLOOKUP stops at the first match found.
Troubleshooting
If you see #N/A, the lookup value was not found in the first column of your range. Check for extra spaces in your data (use TRIM to remove them) or case sensitivity issues. If you see #REF!, your column index number is higher than the number of columns in your table array. Reduce the index number or expand your range. If the result seems random or incorrect, verify that you used FALSE for the match type. Approximate matching requires sorted data and returns unexpected results if unsorted. If the formula works in one cell but fails when dragged, check if your table array references are locked with dollar signs.
Frequently Asked Questions
Can VLOOKUP look to the left?
No, VLOOKUP only searches to the right of the lookup column. To look left, use INDEX/MATCH or XLOOKUP functions instead.
Why do I get #N/A even though the value exists?
This usually happens due to hidden spaces, differing data types (text vs. number), or case mismatches. Use the TRIM function to remove spaces and ensure both the lookup value and source data are formatted identically.
What is the difference between TRUE and FALSE in the last argument?
FALSE (or 0) forces an exact match. TRUE (or 1) finds an approximate match, requiring the first column to be sorted ascendingly. Exact match is recommended for most identification tasks.
Can I use multiple criteria with VLOOKUP?
Standard VLOOKUP handles only one criterion. For multiple criteria, you can create a helper column combining the criteria into a single unique key, or use the FILTER function or XLOOKUP with boolean logic.