Formula Errors

What the #N/A Error Means in Excel

The #N/A error in Excel usually means a lookup could not find its value. Here is what it means, why it happens, and how to check the lookup step by step.

On this page
  1. The usual cause: a lookup with no match
  2. Why a match can fail when it looks right
  3. Check the lookup step by step
  4. When #N/A is intentional
  5. Show a message instead of #N/A

The #N/A error means “not available.” Excel is saying that it can’t find a value the formula needs. Most often this comes from a lookup function, such as VLOOKUP, MATCH or XLOOKUP, that didn’t find a match. Sometimes a person enters #N/A on purpose to mark missing data.

The usual cause: a lookup with no match

A lookup searches one list for a value and returns something from the matching row. If the value isn’t in the list, the function returns #N/A. That’s the lookup doing its job: it found nothing.

For example, =VLOOKUP(A2,D:E,2,FALSE) returns #N/A when the name in A2 doesn’t appear in column D. The FALSE asks for an exact match.

Why a match can fail when it looks right

These are the most common reasons a value looks like it’s in the list but isn’t matched:

  • Hidden spaces. “Smith “ with a trailing space is different from “Smith”. Use =LEN(A2) to count the characters, and compare the count with the list entry.
  • Numbers and text. The number 1001 and the text “1001” don’t match. Check with =ISNUMBER(A2) and =ISTEXT(A2).
  • Spelling and punctuation. Lookups need the same characters. They ignore capital letters, so letter case is rarely the cause.
  • The key isn’t in the first column. VLOOKUP searches only the first column of the range you give it, so the lookup value has to sit in that column.
  • Approximate matching. If the fourth argument is TRUE or left out, VLOOKUP expects the list to be sorted. It returns #N/A when the value is smaller than the first entry. With unsorted data, it can return a wrong value without any error.
  • A range that stops too soon. If the range ends at row 50 but the list runs to row 80, the lower rows are never searched.

How the two match types differ is covered in vlookup exact match vs approximate match.

Check the lookup step by step

  1. Copy the lookup value into an empty cell and compare it with the list entry you expect it to match.
  2. Compare the character counts with LEN on both.
  3. Check the match type. VLOOKUP needs FALSE for an exact match, and MATCH needs 0.
  4. Make sure the range covers every row and that the lookup column is the first column in the range.
  5. Try TRIM on the lookup value in a helper cell. If the match then works, extra spaces were the cause.

If you’re still stuck, the steps in how to use vlookup step by step cover the basics from the start.

When #N/A is intentional

Some people use =NA() to return #N/A on purpose. This marks a cell as missing. Some charts skip #N/A points instead of plotting them as zero, so the function can leave a gap in a chart.

Show a message instead of #N/A

You have three main options:

  • IFNA. =IFNA(VLOOKUP(A2,D:E,2,FALSE),"Not found") shows the message only for #N/A. Other errors still show, which can help you catch real problems. IFNA is available in Excel 2013 and later.
  • IFERROR. Catches every error, including ones you’d want to see. IFNA is usually the safer choice for lookups.
  • XLOOKUP. Its fourth argument sets the value to return when nothing matches. Readers who want a blank instead of a message can see xlookup return blank if not found.

Fix the lookup first. Hide the error only when a missing match is an expected result. Google Sheets uses the same meaning for #N/A, and IFNA works there too.

The complete guide to formula errors

Excel Formula Error Messages Explained
Read the guide

Keep exploring

Guides from other topics

All topics →