How to Use IFERROR with VLOOKUP in Excel: 5 Different Methods

Method 1 – Replace #N/A with Custom Text

Search for a student whose name isn’t in the list, you want to show custom text such as “Not found”. Enter the following formula in cell C14 and press ENTER to do the task.

=IFERROR(VLOOKUP(C13,B4:C11,2,FALSE), "Not Found")

C13 = Lookup value, which will be searched in the list
B4:C11 = Lookup range that is your dataset
2 = Lookup column that is the column of Obtained Marks
FALSE means the function will look for an exact match

Type any student name from your list in cell C13; you will get his/her obtained marks in cell C14.

Replace #N/A with Custom Text

Type any student name that isn’t on your list in cell C13; the C14 cell will show your custom text Not Found.

Replace #N/A with Custom Text


Method 2 – Get Empty Cell Instead of #N/A

Keep the cell empty when the searched name isn’t in your list, type the following formula in cell C13,

=IFERROR(VLOOKUP(C13,B4:C11,2,FALSE), " ")

C13 = Lookup value which will be searched in the list
B4:C11 = Lookup range that is your dataset
2 = Lookup column that is the column of Obtained Marks
FALSE means the function will look for an exact match

Type any student name from your list in cell C13; you will get his/her obtained marks in cell C14.

Get Empty Cell Instead of #N/A

Type any name that isn’t in the dataset, the cell C14 will remain empty.

Get Empty Cell Instead of #N/A


Method 3 – IFERROR with VLOOKUP for Split Dataset

You have two lists in your dataset. You want to find the obtained marks for any student from both lists.

Type the following formula in cell C13 and press ENTER.

=IFERROR(VLOOKUP(C13,B4:C11,2,FALSE),VLOOKUP(C13,B14:C20,2,FALSE))

 

C13 = Lookup value, which will be searched in the list
B4:C11 =1st lookup range that is the 1st list of the dataset
B14:C20 = = 2nd lookup range that is the 2nd list of the dataset
 2 = Lookup column that is the column of Obtained Marks
 FALSE means the function will look for an exact match

Type any of the names from any of your lists, in cell C13, you will get the obtained marks of that person in cell C14.

IFERROR with VLOOKUP for Split Dataset


Method 4 – IFERROR with VLOOKUP to Return Output Every Time

You have contact numbers of different branches of your company in your dataset. You want to show a contact number if anyone searches for any of the branches, even if the branch name isn’t on your list. If the branch name isn’t on the list, you want to show the contact number of the Head office.

Type the following formula in any empty cell and press ENTER.

=IFERROR(VLOOKUP(C13,B4:C8,2,FALSE),VLOOKUP("Head office",B4:C8,2,FALSE))

C13 = Lookup value, which will be searched in the list
B4:C11 = Lookup range that is your dataset
2 = Lookup column that is the column of Contact Number
FALSE
means the function will look for an exact match

Type any branch name in cell C10 that isn’t in the list; you will get the contact number of the head office in the cell where you typed the formula.

IFERROR with VLOOKUP for Returning Output Every Time


Method 5 – Apply VLOOKUP in Older Version of Excel

In Excel 2013 or in any older version the IFERROR function isn’t available, but you can do the same task by using the IF function and the ISNA function along with the VLOOKUP function.

Type the following formula in cell C14 and press ENTER

=IF(ISNA(VLOOKUP(C13,B4:C11,2,FALSE)), "Not Found", VLOOKUP(C13,B4:C11,2,FALSE))

C13 = Lookup value, which will be searched in the list
B4:C11 = Lookup range that is your dataset
2 = Lookup column that is the column of Contact Number
FALSE
means the function will look for an exact match

Type any student name from your list in cell C13; you will get his/her obtained marks in cell C14.

Apply VLOOKUP in Older Version of Excel

Type any student name that isn’t in your list in cell C13; Cell C14 will show your custom text Not Found.

Apply VLOOKUP in Older Version of Excel


Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.


Further Readings


<< Go Back to VLOOKUP with IF Condition | Excel VLOOKUP Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Prantick Bala
Prantick Bala

PRANTICK BALA is a marine engineer who loves exploring Excel and VBA programming. Programming, to him, is a time-saving tool for efficiently managing data, files, and internet tasks. He is proficient in Rhino3D, Maxsurf, C++, MS Office, AutoCAD, Excel, and VBA and goes beyond the basics. Armed with a B.Sc in Naval Architecture & Marine Engineering from BUET, he has transitioned into the role of a content developer. Beyond his work, find him immersed in books, exploring new... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo