IFERROR Function in Excel
The IFERROR function returns an alternate value if the result is an error.
IFERROR( value, value_if_error )
Value: The formula or value that you want to test.
Value_if_error: Is any value or expression or reference if an error is found.(#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME? or #NULL)
Assume that we want to return “null” when the quotient result is an error.
1. Open your table in WPS Spreadsheet, click cell G4
2. Let's do the division first. Click cell C2, enter=A2/B2. We need to fill the rest of this column, so hove over cell C2, and drag it all the way down. Because cell B5 and cell B8 contain the 0 value and letter character, error appears in C5 and C8.
To solve this, head to the Formulas tab > Insert Function > enter IFERROR in the edit box.
3. In the pop-up box, we want to insert the IFERROR function.
1) Value: The formula or value that you want to test. In this case, we get the quotient, so enter C2 at Value.
2) Value_if_error: Is any value or expression or reference if an error is found. We want the error message in cell C2 to become null. So let's enter null at Value_if_error.
So, let's enter C2 at Value, null at Value_if_error.
Finally, the error value in cell C5 and C8 return null in cell D5 and D8.