IFERROR Function in Excel
A free Office suite fully compatible with Microsoft Office
WPS Spreadsheet could be an alternative to Microsoft Office Excel. It includes 100's of built-in formulas, pivot tables, etc.
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 toreturn “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.
Was this helpful?
- 1. How to compare two excel sheets and highlight differences
- 2. How to expand cells to fit text in Excel
- 3. How to copy file names in Excel from a folder?
- 4. How to import external data in WPS Spreadsheet
- 5. How to use the VLOOKUP function across multiple sheets in WPS Office Excel?
- 6. Check if value is in list in Excel (3 easy methods)