Trapping errors can make your spreadsheets more professional by making them less cluttered and more friendly to use.

In this first worksheet, we have a simple table that shows test scores for 5 sections.

Notice we get a Divide by Zero error in column E for the last 2 sections.

That’s because there is no data yet to work within those sections.

If you want to trap and suppress this error, there are a few easy options.

Let’s go over three of these options in Columns G, H, and I.

First, you could test for a blank value in column C using theIF functionwith theISBLANK function.

For the logical test use ISBLANK and C6 for the reference.

Another way to trap this error is to use theIFERROR functionwhich was introduced with Excel 2007.

IFERROR takes two arguments, value and value_if_error.

For value, we supply the original formula, and for value_if_error, use empty double-quotes.

In this case, the logical test is the ISERROR with the original formula.

The value if true is empty double quotes, and the value if false is the original formula.