
If VLOOKUP returns #N/A error because a lookup value isn't found, IFERROR returns "Not Found". In this example, when VLOOKUP returns a result, IFERROR functions that result. The syntax looks like this: =IFERROR(VLOOKUP(value,data,column,0),"Not found")
/ErrorDropdown-5bee099e46e0fb00267bb396.jpg)
You can also use the IFERROR function to catch the #N/A error thrown by VLOOKUP when a lookup value isn't found. When a number is entered in B1, the formula will return the result of A1/B1. Example #2įor example, if A1 contains 10, B1 is blank, and C1 contains the formula =A1/B1, the following formula will catch the #DIV/0! error that results from dividing A1 by B1: =IFERROR (A1/B1,"Please enter a value in B1")Īs long as B1 is empty, C1 will display the message "Please enter a value in B1" if B1 is blank or zero. This formula catches the #DIV/0! error that occurs when Qty is empty or zero, and replaces it with zero. In the example shown, the formula in E5 copied down is: =IFERROR(C5/D5,0) IFERROR checks for the following errors: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!. Use the IFERROR function to trap and handle errors produced by other formulas or functions. The IFERROR function is a modern alternative to the ISERROR function.

When a formula returns an error, IFERROR returns an alternative result. IFERROR is an elegant way to trap and manage errors. When a formula returns a normal result, the IFERROR function returns that result.

The IFERROR function is used to catch errors and return a more friendly result or message when an error is detected.
