IFERROR Function

How to use the IFERROR Function in Excel:

The IFERROR Function can be used to catch an error returned in your formula by returning a different result.

You can use the IFERROR Function for the following errors:
#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!

The following example compares the percentage increase/decrease from your 2018 inventory to your 2019 inventory.

As you can see from the above example, there is an error returned for Tomatoes in cell G6.  The error is returned because we are trying to divide the difference between the year 2018 and year 2019.  Year 2018 shows a zero value, so trying to divide using a zero value will produce the #DIV/0! error.
Formula used in cell G6: =F6/D6

To get rid of the #DIV/0! error, we will place the following formula into cell I6: =IFERROR(F6/D6,””)

We are now telling the formula to show no result if an error is returned.  The “” at the end of the formula will leave cell I6 with an empty string.