To replace the #N/A from a failed lookup with your own text, wrap the whole VLOOKUP in IFERROR: =IFERROR(VLOOKUP(A1,$D$1:$E$100,2,0),"Not Found"). The second argument is whatever you want shown instead — text, a zero, or “” for a blank cell.
One caveat worth knowing: IFERROR catches every error, so a broken range (#REF!) or a wrong column number (#VALUE!) also gets hidden behind “Not Found”, and you’ll never see that your formula is actually faulty. Use =IFNA(VLOOKUP(A1,$D$1:$E$100,2,0),"Not Found") instead when you only want to trap genuine “not in the list” cases and still see real errors.
On Excel 2003 and earlier, where neither function exists, use =IF(ISNA(VLOOKUP(A1,table,2,FALSE)),"Not Found",VLOOKUP(A1,table,2,FALSE)). And if you’re on Excel 365 or 2021, XLOOKUP has this built in as its fourth argument: =XLOOKUP(A1,D1:D100,E1:E100,"Not Found").
While using VLOOKUP, whenever the value you are looking for is not there in the data, you get a #N/A error. In simple words, whenever VLOOKUP is not able to find the value it returns #N/A.
For example, you have a list of employees’ names, and you want to look up the name “John”. But unfortunately, that name is not there on the list.

Now in this situation, VLOOKUP will return #N/A. You know the reason for this error, but maybe not everyone does. So, the better way is to replace #N/A with a custom value so that everyone can understand why this error is there.
And for replacing the #N/A error, the best way is to use IFERROR with VLOOKUP. IFERROR is a function that can help you to evaluate a value, and if that value is an error, it will return a custom value instead of that error.
So, today in this post, you will learn how to use VLOOKUP without a #N/A error by combining it with IFERROR. But before you combine both of these functions, you need to understand how IFERROR works.
How IFERROR Works
In the IFERROR function, you need to specify two things. First, the value you want to evaluate, and second, a custom value you want whenever an error occurs. Here is the syntax for IFERROR:
IFERROR(value, value_if_error)
- value: A Value to evaluate.
- value_if_error: Value which you want to get in return when an error occurs.

- First of all, IFERROR evaluates the value.
- After that, if the value is an error, it returns the value you have specified for the error; otherwise, it returns the value itself.
Combine IFERROR with VLOOKUP
Now, it’s time to combine VLOOKUP and IFERROR. For this, in IFERROR, you simply need to replace the value with the VLOOKUP formula.
And, for the value_if_error argument, specify a value you want to return whenever VLOOKUP returns #N/A.
Here in the below example, you have used “Not Found” for the value_if_error argument. In all the cells where you had an error, it has returned “Not Found”.
Here’s the formula, where A1 has the value to look up and “table” is the range of your data:
=IFERROR(VLOOKUP(A1,table,2,FALSE),"Not Found")
If you want an empty cell instead of a message, use two double quotes as the value_if_error:
=IFERROR(VLOOKUP(A1,table,2,FALSE),"")

How Both Functions Work
In this combination, both of the functions work in a sequence. First, VLOOKUP works in the same manner in which it works all the time. It looks up a value and returns the result value if found; otherwise, it returns an error.

Second, IFERROR evaluates the result of VLOOKUP. And, if that result is an error, it will replace that error with the custom value you have specified. Otherwise, it will do nothing and you get the same result that VLOOKUP has returned.

Point To Remember
You need to understand one thing: IFERROR replaces the value for all types of errors. So, you will get the same custom value for all the errors, including a #REF! from a wrong column number or a #DIV/0! from the data itself, which can hide a real mistake in your formula.
And if you are likely to get an error other than #N/A, you can replace IFERROR with IFNA, which only replaces #N/A and lets the other errors show (IFNA is available in Excel 2013 and later):
=IFNA(VLOOKUP(A1,table,2,FALSE),"Not Found")
Problem with Older Versions
In Excel 2003 and older, IFERROR is not there (it came in Excel 2007). But you can still replace #N/A with a custom value. For this, you need to combine IF and ISNA with VLOOKUP. And the formula will be:
=IF(ISNA(VLOOKUP(A1,table,2,FALSE)),"Not Found",VLOOKUP(A1,table,2,FALSE))
In this formula, you have evaluated VLOOKUP with ISNA (which returns TRUE only for #N/A). So when VLOOKUP returns #N/A, ISNA converts it to TRUE.
After that, IF returns the value that you have specified for TRUE. Otherwise, it returns the value for FALSE, which is the same VLOOKUP formula.
Use XLOOKUP Instead
If you use Microsoft 365 or Excel 2021 and later, XLOOKUP has a built-in if_not_found argument, so you don’t need IFERROR at all. Like IFNA, it only handles the “not found” case, and other errors still show:
=XLOOKUP(A1,D2:D20,E2:E20,"Not Found")
Fix the Cause of #N/A First
Before you hide #N/A, check that the value is really missing. These are the common reasons VLOOKUP doesn’t find a value that is there:
- Extra spaces: “Tom ” with a trailing space doesn’t match “Tom”. Clean the data with TRIM.
- Numbers stored as text: 101 as a number doesn’t match “101” as text. Convert the text to numbers (or the other way round) so both are the same type.
- The value isn’t in the first column: VLOOKUP only looks in the first column of the table.
Conclusion
I strongly believe that you should always use IFERROR with VLOOKUP to replace #N/A. The biggest reason is that when you have numeric values in your data, you can’t do calculations on a range that has an error in it.
For example, if you have a pivot table and in the source data you have a #N/A error, then the same error will reflect in the pivot table. So the best way is to replace that error with a “0”.
I hope you found this formula tip useful. And, it would be great if you share this tip with your friends.
Frequently Asked Questions
Should I use IFERROR or IFNA with VLOOKUP?
Use IFNA when you only expect values that are not found. It keeps other errors visible, so a wrong column number or a broken range still shows up. Use IFERROR when you want to hide every error.
How do I return 0 instead of #N/A?
Use 0 as the value_if_error, without quotes, so the result is a number you can use in SUM and other calculations:
=IFERROR(VLOOKUP(A1,table,2,FALSE),0)
Why do I still see “Not Found” when the value is there?
VLOOKUP didn’t find an exact match, usually because of extra spaces or numbers stored as text. Remove IFERROR for a moment to see the real error, and then fix the data as shown above.
Oh what an error
I was just checking statement of “Problem with Older Version” and found if there should be ISNA and not IFNA, please correct me if I’m wrong.
In this formula…… an error IFNA converts it into TRUE. (here I think should be ISNA)
Why not we use IFNA? as IFERROR covers all the erros and we may be ignorant about other errors like #REF!, #NULL!, #NUM!
I have mentioned that.
Oh! my poor reader me.