You can see the value. It is on row 412 of the price list. You typed it into the formula. And Excel still answers #N/A.
This is the most common spreadsheet support question there is, and almost every time the answer is the same: the two cells are not equal. They look equal on screen. They are not equal to Excel. The formula is fine; the data is lying to you.
Below is what #N/A actually means, the three things that cause it in practice, and a ten-minute routine that finds the real cause instead of guessing.
What #N/A is telling you
VLOOKUP with the fourth argument set to FALSE (exact match) walks down the first column of your lookup range and compares each cell to your lookup value. If nothing matches exactly, it returns #N/A.
Not "close enough". Not "roughly the same". Exactly. Excel compares values, not appearances, and two values that render identically can still be different values. A number and a piece of text that spells that number are different. A name with a trailing space is a different name from one without.
So the useful question is never "why is VLOOKUP failing". It is "what is actually in these two cells".
Cause 1: the number is stored as text
This is the big one. It happens whenever data arrives from somewhere else: a CSV export from a bank, a copy from a PDF, a system that pads account numbers, a column that someone typed by hand.
Excel shows 10045 either way. But one cell holds the number 10045 and the other holds the six characters "10045". Text and number never match in an exact lookup.
You can usually spot it: text-formatted numbers sit slightly left in the cell by default, and often carry a small green triangle in the corner. But do not trust the alignment, because alignment is a formatting choice someone can change. Check the value:
=ISTEXT(A2) returns TRUE if the cell is text =ISNUMBER(A2) returns TRUE if it is a real number Or compare the two cells directly. If =A2=B2 returns FALSE while both look identical, you have found your problem in one step.
Fixes, in order of preference:
- Fix the source. If a monthly export always sends text, change the import, not the spreadsheet. In Excel's Power Query, set the column type once and every refresh is clean. This is the only fix that stays fixed.
- Convert in place. Select the column, use Data > Text to Columns, and press Finish without changing any delimiter. Excel re-evaluates each cell and converts numeric text to numbers.
- Convert inside the formula.
=VLOOKUP(VALUE(A2),...)or=VLOOKUP(A2*1,...). It works, but now every formula carries a patch for a data problem, and one day someone will copy it into a sheet where it breaks.
Cause 2: invisible characters
Text that came from a web page, an email, or a copy of a formatted report often carries characters you cannot see. The two usual suspects:
- A trailing space (or several).
"Ahmed "is not"Ahmed". - A non-breaking space, character 160.
TRIMdoes not remove it. This one wastes hours because the cell looks completely normal and TRIM appears to do nothing.
Diagnose with =LEN(A2) against a cell you know is clean. If the length is one or two characters longer than what you see, there is something in there. =CODE(RIGHT(A2,1)) returns 32 for a normal space and 160 for a non-breaking space.
Fix with a cleaned lookup value:
=VLOOKUP(TRIM(SUBSTITUTE(A2,CHAR(160)," ")), range, 2, FALSE) Better, add a helper column that holds the cleaned value and look up against that. Cleaning once, in one place, is easier to audit than cleaning inside fifteen formulas.
Cause 3: the two values are genuinely different
Less common, but it happens, and it is the one people argue about because the cells really do look the same:
- Leading zeros were dropped. An account number
0012345stored as a number becomes12345. The other table kept it as text with the zeros. They will never match. - One is a date, the other is text that looks like a date. Excel stores dates as serial numbers.
12/03/2026typed as text is not the same value as the date 12 March 2026. - Different rounding.
=ROUND(x,2)in one table and an unrounded value in the other.12.34and12.3400001display the same at two decimals and are not equal. - Case is fine, but whitespace inside is not.
"Ali Hassan"versus"Ali Hassan"with two spaces.
The test is the same as before: put the two cells side by side and ask Excel whether they are equal. If it says FALSE, stop looking at the screen and start looking at the values.
The ten-minute audit
When a lookup fails and you do not know why, do this instead of editing the formula:
- Confirm the value exists.
=COUNTIF(lookup_column, lookup_value)returns 0 when there is genuinely no exact match, and 1 or more when the value is there and something else is wrong. - Compare the two cells directly.
=A2=B2between your lookup value and the cell you can see in the table. - Check the type of both.
=ISTEXT()and=ISNUMBER()on each. - Check the length of both.
=LEN()on each. Different lengths with identical-looking text means invisible characters. - Check the range. This is the boring cause people skip: the lookup range does not start at the column that holds the key, or
$anchors are missing and the range shifted when the formula was filled down. - Check the match argument. A missing fourth argument makes VLOOKUP approximate, and approximate matching on unsorted text gives confidently wrong answers, which is worse than #N/A.
If steps 1 to 4 all pass and the lookup still fails, the problem is the range, not the data.
Preventing the next one
- Always write the fourth argument.
FALSEfor exact match, every time, even when you are sure. Omitting it is the single most common way a spreadsheet returns a wrong number that looks right. - Type your key columns on import. One column type set in Power Query saves a hundred future #N/A.
- Keep keys as text when they are identifiers. Account numbers, order codes and postal codes are not quantities. Store them as text and the leading zeros stay.
- Use a helper column for cleaned values. One visible, auditable column beats twelve formulas with
TRIMburied in them. - Prefer
XLOOKUPif your Excel has it. It matches exactly by default, it does not care which side the return column is on, and it fails loudly instead of returning a nearby wrong answer.
None of this requires new software. It requires deciding, once, that a #N/A is information: it is Excel telling you the two values are not the same, and your job is to find out how.
Microsoft's own troubleshooting reference covers the same ground from the vendor side, and is worth keeping open the next time a lookup refuses to cooperate: Quick Reference Card: VLOOKUP troubleshooting tips.
Written with AI assistance.
