Tip Printed from ExcelTip.com
Vlookup Formula – Eliminating Errors
To eliminate errors that occur when using the Vlookup Formula:
In the screenshot below are four Vlookup Formulas. In this example, we asume that the index number 1346 is not included in the index list in the leftmost column of the data table, the index number 1353 is included and the defined Name for the data table is Data:
Cell C2: The fourth argument of the Vlookup Formula is empty, therefore, the formula returns a result according to a number equal to or less than the lookup number from the index list.
Cell C4: In the fourth argument of the Vlookup Formula = FALSE, therefore, the formula returns errors when the lookup value is not included in the index list, which is the leftmost column of the data table.
Cell C6: The ISERROR formula, nested in the IF formula, returns TRUE when Vlookup Formula returns an error, and therefore, the final result is 0.
Cell C8: The ISERROR formula nested in the IF formula returns FALSE and the Vlookup formula returns the appropriate result number.