Excel shows "cannot find a match" (often as #N/A or "No match found" in a lookup or XLOOKUP prompt) because the value you are looking for is not stored the way you think it is. The most common causes are extra spaces, numbers stored as text, a lookup range that starts in the wrong column, or a lookup value that is subtly different from the table entry. Fix it by cleaning the data first, then rebuilding the formula so the value and the range talk about the same thing. Note that menu names and function behavior can differ slightly by Excel version, platform and region, but the steps below apply to Excel for Microsoft 365, Excel 2021 and 2019 on Windows and Mac.
What You'll Need
- The workbook containing the formula, opened in Excel (desktop is safest; Excel for the web has fewer functions).
- The lookup value you are searching for, and the table or range you are searching in.
- Awareness of whether the lookup column is text or numbers, and whether the ranges are exact matches or approximate.
- Optional but useful: a couple of test rows where you know the correct answer, so you can verify the fix.
Step-by-Step
- Confirm which function is failing. Look at the formula in the cell. VLOOKUP, HLOOKUP, MATCH and XLOOKUP all return #N/A when they cannot find the value. XLOOKUP has an if_not_found argument, so it can also return a custom message like "No match found". Knowing the function tells you which argument to check next.
- Check for stray spaces. This is the single most common cause. A cell containing "Smith " (with a trailing space) does not match "Smith". Click the cell, press F2 to edit, and look at the formula bar. Use the formula bar rather than the cell display, because leading and trailing spaces are invisible in the grid. If you find spaces, clean them with =TRIM(A2) in a helper column, copy the result, then paste it back as values.
- Check for non-printing characters. Text pasted from websites or PDFs often contains line breaks or hard spaces that TRIM does not remove. Use =CLEAN(TRIM(A2)) to strip most of them. If the value still will not match, compare the lengths: =LEN(A2) against =LEN(B2) shows immediately whether the two "identical" strings differ in length.
- Check whether numbers are stored as text. A number stored as text (left-aligned by default, often with a small green triangle in the corner) will not match a real number, and vice versa. Select the column, look at the alignment of the values, and use the error indicator's Convert to Number option, or multiply the value by 1 in a helper column. The green triangle is a reliable visual cue.
- Check the lookup range's first column. VLOOKUP and HLOOKUP only search the leftmost column (or top row) of the range you give them. If your lookup value sits in column C but the range you passed starts at column D, the lookup will never succeed. Either widen the range so the key column is included, or switch to INDEX and MATCH, or to XLOOKUP, which can look in any column and return from any other column.
- Set the match mode correctly. For VLOOKUP the last argument must be FALSE (or 0) for an exact match. TRUE (or 1) allows approximate matching, which can silently return the wrong row. MATCH should use 0 for exact matching. XLOOKUP's fifth argument is the match mode: 0 is exact. Approximate matching is legitimate for ranges like tax brackets or grade scales, but only when the list is sorted ascending.
- Lock the range with absolute references. If you copy the formula down and the range shifts, later rows may point at the wrong table area. Use dollar signs, for example =VLOOKUP($A2,$D$2:$F$100,3,FALSE), so the lookup value moves but the table stays fixed. Press F4 while editing to toggle the reference type.
- Test the value directly. In a blank cell, type =A2=B2 where the two cells should hold the same value. If it returns FALSE, the values genuinely differ, and the reason is almost always whitespace, character encoding or number-versus-text. If it returns TRUE but the lookup still fails, the problem is in the range reference, not the value.
- Handle true missing values deliberately. If the item really is not in the table, wrap the formula so the result is readable. =IFERROR(VLOOKUP(...),"Not in list") replaces #N/A with a plain message, and XLOOKUP's if_not_found argument does the same job without a wrapper. Do not suppress errors blindly, though: masking #N/A hides real data problems.
- Recalculate and re-check. Press F9 to force a recalculation, or check Formulas > Calculation Options, since manual calculation mode can leave stale results on screen. Then verify one or two rows against known answers before filling the formula across the whole column.
Common Mistakes
- Cleaning the lookup value but not the table, or the other way round. Both sides must be clean for an exact match to work.
- Using TRUE as the VLOOKUP last argument by habit. It returns approximate matches and can be wrong on unsorted data with no error shown.
- Typing the lookup value with different capitalisation or a trailing space in a search box or filter, then blaming the formula. Excel's exact matching is forgiving on case but not on spaces.
- Deleting the helper columns that contain the cleaned values before pasting the results back as values. The formula then breaks with #REF!.
- Forgetting that hidden characters can survive a copy-paste from a web page. Always sanity-check with LEN before assuming the data is clean.
- Assuming the error means the item does not exist. More often the item exists and the comparison is simply failing.
Tips
- Prefer XLOOKUP where it is available: it searches in any direction, returns from any adjacent column, and has a built-in if_not_found argument, which removes most of the range-related failures.
- Format both the lookup value and the key column consistently before building the formula. Cleaning data before writing formulas saves far more time than dragging errors around afterward.
- Use structured references on Excel Tables (for example =VLOOKUP([@ID],Table1,3,FALSE)) so ranges expand automatically as rows are added.
- Keep a short validation column with =COUNTIF($D$2:$D$100,A2) next to your lookup. A zero pinpoints the rows that will fail before the formula even runs.
- If a lookup keeps failing on imported data, try pasting through Notepad (Windows) or TextEdit (Mac) as plain text first to strip formatting and hidden characters.
Troubleshooting
If the formula still returns #N/A after cleaning, compare the two cells character by character. Use =EXACT(A2,B2) to test whether they are identical including case, and =CODE(MID(A2,1,1)) versus =CODE(MID(B2,1,1)) to spot a hard space (character 160) or another hidden symbol. A difference at the first character is a strong sign of pasted non-breaking spaces.
If the error appears only in some copied rows, inspect the formulas in those rows. Relative references that were meant to be absolute are the usual culprit. If the error appears in every row and the range looks correct, confirm the table is not pointing at a different worksheet that was renamed or deleted.
If the lookup returns the wrong row rather than an error, switch the match argument to exact. Approximate matching on an unsorted list produces confident, wrong answers with no warning. If you are working across files and the source workbook is closed, reopen it; external references sometimes resolve only when the source is open. Finally, if the workbook acts oddly in general, close it without saving, reopen it, and try again, or work on a copy so you can compare behavior.
Frequently Asked Questions
Why does VLOOKUP say no match when the value is clearly there?
Almost always because the two values differ invisibly: a trailing space, a non-printing character, or one stored as text and the other as a number. Compare lengths with LEN and test equality with a simple =A2=B2 comparison.
What is the difference between #N/A and "No match found"?
#N/A is Excel's standard error for a failed lookup. "No match found" is usually a custom message supplied by XLOOKUP's if_not_found argument or by IFERROR. Both mean the same thing: the lookup value was not found in the range.
Can I make Excel find near matches, such as misspellings?
Excel has no built-in fuzzy lookup in standard functions. Approximate matching in VLOOKUP and MATCH works on sorted numeric or ordered lists, not on spelling similarity. For typo-tolerant matching you need a helper column with cleaned standardized text, or a third-party add-in from an official source.
Does case matter in Excel lookups?
No. VLOOKUP, MATCH and XLOOKUP in their default modes ignore case, so "SMITH" and "smith" match. If case must matter, use a case-sensitive formula or EXACT-based construction.
Why does the lookup work in one row but not the next?
Check for relative references that shifted when the formula was filled down. Lock the table range with dollar signs so every row looks at the same area of the sheet.
Can I replace the error with a blank cell?
Yes. Use =IFERROR(formula,"") or XLOOKUP's if_not_found argument set to an empty string. Do this only when a missing value is genuinely acceptable, because it also hides data entry mistakes.