Ex-boyfriends, late night eBay purchases: We all wish we could hide from our mistakes. While I can’t offer a solution to these problems, I can help you hide your errors in Excel.
—Excel’s IFERROR function allows you to mask formula errors with whatever value you want. I don’t recommend you replace all formula errors with the correct answer to solve the underlying problem, but in some cases it’s extremely useful.
IFERROR traps formula errors before they’re returned and replaces them with a desired value. The IFERROR function has two arguments separated by a comma. The first is your formula and the second is the value you want to return if the formula results in an error.
In the example above, I started out with a messy data table filled with divided by zero errors. I used the IFERROR function and entered the formula, a comma, and then 0. Now, any time the formula results in an error, 0 is returned.