Mastering IFERROR Function in Excel: Error Handling Made Easy
Share
Working with Excel is efficient, but it can get messy when formulas throw errors like #DIV/0! or #N/A. Even experienced users run into them. The IFERROR function is designed to handle these situations by giving you control over what shows up when an error occurs. Instead of a sheet full of error codes, you can return something more useful.
What is IFERROR?
The IFERROR function checks a formula for errors and, if one occurs, displays an alternative result you specify. Without it, error messages like #DIV/0!, #N/A, or #VALUE! can clutter your sheet and make reports harder to read. With IFERROR, you can replace those errors with text, a number, or even another formula.
Syntax
=IFERROR(value, value_if_error)
- value: The formula or expression to check.
- value_if_error: The result to return if the formula generates an error.
Example
Suppose you are calculating the average points per project for each student. If a student has zero projects listed by mistake, dividing points by zero would normally return #DIV/0!. Wrapping the formula with IFERROR gives a cleaner result.
The table we will use is below, with points in column C, # of projects in column D, and the average score per project in column E:

Without error handling
In E4 we'll enter and fill down:
=C4/D4

- Student B returns #DIV/0! because Assignments is 0.
- Student D returns #DIV/0! because Assignments is blank.
With IFERROR
Replace E4 with and fill down:
=IFERROR(C4/D4, "To Review")

Rows with 0 or blank in Assignments show "To Review" instead of an error, which is much easier to look at and assess

Why Use IFERROR
IFERROR doesn’t change the calculation itself. It only replaces errors with a clearer result, such as text or a placeholder value, so your sheet remains easy to read even when data is missing or incomplete.
Conclusion
Errors are common in Excel when working with real-world data. IFERROR helps manage them by letting you decide what appears in place of error codes. It’s a simple way to make spreadsheets easier to understand and present.