If VLOOKUP did not find a value in Google Sheets, the usual cause is that the lookup key does not exactly match the first column of the selected range, or the formula is using approximate matching. With the value to find in A2 and the lookup table in D2:F100, use an exact-match formula like =VLOOKUP(A2,$D$2:$F$100,2,FALSE); then check spaces, data types, and the range if it still returns #N/A.
What the VLOOKUP error means
Google Sheets shows #N/A when a lookup cannot return a matching result. With exact matching, that generally means Sheets did not find the search key in the first column of the range. The error does not necessarily mean the value is absent from the sheet: it might be present but stored differently, separated by an invisible character, or outside the range named in the formula.
First, read the whole formula and identify four parts: the key to search for, the table range, the number of the result column within that range, and the match setting. For example, in the formula above, Sheets searches for A2 in column D, then returns the corresponding value from the second column of D:F, which is column E. The dollar signs keep the lookup range fixed if the formula is copied down; they do not change the values being searched.
If the cell shows a different error, diagnose that separately. #REF! can indicate that the requested result column is outside the selected range. A formula parse error can indicate incorrect punctuation or parentheses. A blank result may mean the matched row has an empty cell in the return column, rather than that the lookup failed.
Check exact match and the search column
VLOOKUP’s fourth argument controls how it searches. Use FALSE for an exact match when finding an ID, name, product code, or other value that should match literally. If you omit that argument, Google Sheets uses approximate matching. Approximate matching is intended for ordered numeric bands or similar lookup tables, and it expects the first column to be sorted in ascending order. Using it on an unsorted list can produce a result that is wrong, not just an error.
Also confirm that the key is in the leftmost column of the range. VLOOKUP searches only that first column; it cannot look in the middle of the range and return a value to its left. The result column number is counted from the start of the range, not from the worksheet. If the range begins in D, then D is column 1, E is column 2, and F is column 3.
- For a lookup that should match a specific value, set the last argument to
FALSE. - Make sure the search column is the first column in the selected range.
- Count the return column from the left edge of that range, and ensure the index is not larger than the range’s width.
- Check that the range includes the row containing the key, including any newly added rows.
Look for spaces and invisible characters
Two cells can look identical on screen but contain different text. A name might have a space at the end, a pasted value might include a nonbreaking space, or a cell might contain a line break or other nonprinting character. These are common issues when data comes from websites, PDFs, exports, or another system. A regular space at the beginning or end is easy to overlook and can prevent an exact match.
For a quick check, compare the character counts or inspect the cell in the formula bar. TRIM removes ordinary leading and trailing spaces and reduces repeated internal spaces, but it does not remove every kind of invisible character. CLEAN removes certain nonprinting characters, but it is not a universal repair for all Unicode whitespace. A nonbreaking space can often be handled by replacing character 160 before trimming.
With the suspect lookup text in A2, this formula replaces nonbreaking spaces with ordinary spaces and then trims the result: =TRIM(SUBSTITUTE(A2,CHAR(160)," ")). To use this approach consistently, make a cleaned helper column for both the lookup key and the table’s first column, then run VLOOKUP against the cleaned values. Cleaning only A2 will not help if the table key still contains the unwanted character.
Do not remove spaces automatically from every kind of key. Spaces can be meaningful in a product description or full name. Compare a few source records and decide whether the cleanup reflects the data’s intended meaning before applying it to an entire column.
Check whether numbers and text are mixed
A number such as 2048 and the text string "2048" may display the same way but have different underlying types. This can happen when one column was imported as text and another was entered as numbers. Changing the cell’s number format changes how a value appears; it does not always convert text into a numeric value. Look for clues such as left-aligned imported numbers, a leading apostrophe, or inconsistent results when comparing the source columns.
If A2 contains numeric text that should be a number, and the conversion is valid, a helper formula can convert it. With the value to convert in A2, use =VALUE(A2). Apply the same type consistently to the lookup column; converting only the search key can leave the mismatch in place. Be cautious with codes that contain leading zeroes, such as 0042. Those are often identifiers, not quantities, and converting them to a number would remove meaningful zeroes.
For identifiers, it is usually better to store both sides as text in a consistent way. For actual quantities, dates, or numeric thresholds, consistent numeric values are often more appropriate. The goal is not to force every lookup into one data type, but to make the search key and lookup column represent the same kind of value.
Verify the range and return-column number
VLOOKUP’s range must start with the column that contains the keys and extend far enough to include the value you want returned. If the table starts in D but the formula’s range starts in E, a key that exists in D will not be found by that formula. Likewise, a formula such as =VLOOKUP(A2,D2:E100,3,FALSE) asks for a third column from a range that has only two columns. That setup causes a reference error because the requested result column is outside the range.
When copying a formula down, check whether the range shifts. A reference such as D2:F100 can become D3:F101 on the next row, which may unintentionally drop the first record and include a different last row. Absolute references, as in $D$2:$F$100, keep the table fixed while the formula is copied. If the table is likely to grow, use a range that includes future rows or a whole-column range when suitable; whole-column lookups can be less efficient in large or complex sheets.
For a short diagnostic, use COUNTIF to test whether the lookup column contains the key at all. With the key in A2 and candidate keys in D2:D100, use =COUNTIF(D2:D100,A2). A result of zero suggests no exact value was found under that comparison; a positive result confirms at least one match in that range. COUNTIF is a clue, not a complete test for every text-cleaning or type issue, so inspect the values if the result conflicts with what you see.
Understand duplicates and the first matching row
When the first column contains the same lookup value more than once, VLOOKUP returns the result associated with the first matching row in the range. It does not report a duplicate as an error, and it does not automatically choose the most recent record or the row with the largest value. If the result seems unexpected, sort order and duplicates may be the explanation rather than a failed lookup.
Filter or sort the source table to inspect repeated keys, and decide which record should be authoritative. If the latest row should win, arrange the data or use a formula designed to search from the bottom where supported. If duplicates represent separate valid records, VLOOKUP may not be the right tool because it returns one result rather than all matches. Google Sheets’ FILTER function can return multiple rows that meet a condition, but the output may spill into neighboring cells, so leave room for it.
Use a safer error message after fixing the cause
IFNA can replace a genuine no-match result with a clear message, but it should not be used to hide a broken range or incorrect lookup setup. If the key is in A2 and the lookup table is D2:F100, this formula displays a message only when VLOOKUP returns #N/A: =IFNA(VLOOKUP(A2,$D$2:$F$100,2,FALSE),"No match"). A result of “No match” is easier for a report reader to understand, but the underlying reason still needs investigation when a match was expected.
IFERROR is broader: it catches other errors too, including some problems that deserve attention. For routine missing records, IFNA is more targeted. During troubleshooting, temporarily remove the wrapper so the original error remains visible. Once the lookup behaves correctly, a friendly fallback can make a finished sheet easier to use.
When to use another lookup method
VLOOKUP is convenient when the key is in the leftmost column and the desired result is to its right. If the return data is to the left, rearranging the table may be inconvenient. INDEX with MATCH is a common alternative because the lookup and return columns can be specified separately. With the key in A2, keys in D2:D100, and results in C2:C100, use =INDEX(C2:C100,MATCH(A2,D2:D100,0)). The zero in MATCH requests an exact match.
Google Sheets also supports XLOOKUP, which separates the lookup range from the return range and can be easier to read. With the lookup value in A2, keys in D2:D100, and results in E2:E100, use =XLOOKUP(A2,D2:D100,E2:E100,"No match"). Consider whether collaborators’ spreadsheet versions support the function before choosing it for a shared file. Excel differs in some function availability and interface details, so a sheet shared between Google Sheets and Excel may need a compatibility check.
Changing functions will not fix dirty data or inconsistent types by itself. Before switching, verify that the key and source value genuinely match, and that the expected record is present. A simpler formula is helpful only when it searches the correct data.
Frequently Asked Questions
Why does VLOOKUP say it cannot find a value that is visibly there?
Often the cells differ by a trailing space, nonbreaking space, hidden character, or text-versus-number type. The value may also be outside the formula’s range, or the formula may be searching a different first column than expected. Compare the underlying values and check the range before changing the formula.
Does Google Sheets VLOOKUP require the first column to be sorted?
Not for an exact lookup using FALSE. Approximate matching, which is used when the last argument is TRUE or omitted, expects the first column to be sorted in ascending order. For IDs and names, specify FALSE to avoid relying on approximate-match behavior.
Can VLOOKUP search to the left?
No. VLOOKUP searches the first column of its range and returns a value from a column to the right. Use INDEX with MATCH or XLOOKUP when the return column is left of the lookup column, or when separate lookup and result ranges make the formula clearer.
Why does VLOOKUP return the wrong duplicate?
It returns the first matching row in the range. Check for repeated keys and whether the table’s row order puts an older or otherwise unwanted record first. Decide which duplicate should be used before changing the lookup method.
Should I wrap every VLOOKUP in IFERROR?
Not while troubleshooting. A broad error wrapper can make a broken formula look like an ordinary missing result. Use IFNA for an intentional no-match message after verifying the formula, and leave errors visible when they indicate a problem that needs correction.
Related
- Insert a Section Into a Table of Contents in Microsoft Word
- Signature Line in Word Without the X Placeholder Symbol
- Insert a Square Checkbox in Word: Symbol or Clickable Box
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Create Name Tag Labels in Word, Step by StepTo create name tag labels in Word, open Mailings > Labels, choose a label product that matches your…
- How to Insert a Citation Placeholder in WordTo insert a citation placeholder in Word for Microsoft 365 on Windows, place the cursor where the citation…
- Excel Day Counter: Count Days Between DatesWith a start date in A2 and an end date in B2, enter =B2-A2 to count the days…
- Create an Envelope Template in Word: A Practical GuideIn Microsoft Word for Microsoft 365 on Windows, go to Mailings > Envelopes, enter the delivery and return…
- Out of Office in Outlook 365: Set an Automatic ReplyTo set an out-of-office email in Outlook 365, open Automatic Replies for your account, turn on automatic replies,…
- Freeze Panes in Excel: How to Keep Rows and Columns VisibleTo insert a freeze pane in Excel for Microsoft 365 on Windows, select the cell immediately below the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.