How to ignore errors with Vlookup function in Excel?
Normally if error cells exist in a reference table, the Vlookup function will return the errors too. See the screen shot below. Some users may not want to show the errors in the new table, therefore, how to ignore errors of original reference table when applying Vlookup function in Excel? Here we recommend two methods to solve it quickly.
Recommended Excel Productivity Tools
This method will walk you through changing the original reference table and get a new column/table without error values, and then applying the Vlookup function in this new column/table in Excel.
Step 1: Besides original reference table, insert a blank column and enter a column name for it.
In our case, I insert a blank column right to Age column, and enter the column name of Age (Ignore Error) in the Cell D1.
Step 2: Now in the Cell D2 enter =IF(ISERROR(C2),"",C2), and then drag the Fill Handle to the range you need.
Now in the new Age (Ignore Error) column, the error cells are replaced by blank.
Step 3: Now go to the cell (Cell G2 in our case) where you will get the vlookup values, enter the formula =VLOOKUP(F2,$A$2:$D$9,4,FALSE), and drag the Fill Handle to the range you need.
Now you will see if it's error in the original reference table, the Vlookup Function will return blank.
Sometimes, you may not want to modify the original reference table, therefore, combining the Vlookup function, IF function, and ISERROR function can help you check whether the vlookup returns errors and ignore these errors with ease.
Go to a blank cell (in our case we go to the Cell G2), enter the formula =IF(ISERROR(VLOOKUP(F2,$A$2:$C $9,3,FALSE)),"",VLOOKUP(F2,$A$2:$C $9,3,FALSE)), and then drag the Fill Handle to the range you need.
Note: In the formula of =IF(ISERROR(VLOOKUP(F2,$A$2:$C $9,3,FALSE)),"",VLOOKUP(F2,$A$2:$C $9,3,FALSE)), the F2 is the cell containing content you want to match in the original reference table, the $A$2:$C $9 is the original reference table. And this formula will return blank if matched value is error in the original reference table.
|Formula is too complicated to remember? Save the formula as an Auto Text entry for reusing with only one click in future!
Read more… Free trial