​​​​Iferror

Checks if the value given as first argument is any type of error. If it is an error, the second argument is used as value. If it is not an error, the cell will be filled with the value given as first argument.

Iferror syntax

=IFERROR(Value, Value if error)

Argument Argument description
1Value The value that is checked to be an error. If it is not an error, this value will be returned.
2Value if errorThe output that will be returned by Excel if the first argument is an error.
Spreadsheet editor

Explanation

Calculating the ratio between two things requires dividing the two things. In this case, dividing the number of chairs by the number of people to get the chairs per person ratio. If we have 0 people, we end up dividing by 0. Dividing by 0 is not allowed in mathematics, so Excel shows an error.

Then, we use IFERROR to change the value of the cell to 0 if this error is shown. This way, the errors will not perpetuate throughout the workbook.

Questions

Is there an IFNOTERROR function?

No, there is not. However, you could copy the formula in the answer below to accomplish the same thing.

Can I change the value if it isn’t an error?

Yes, although there is no function in Excel to do this, you can create your own formula. You could use something like:
=IF(ISERROR(A1), "Error detected", "No error here")
This formula checks cell A1 for errors. If there is an error, the value will be “Error detected”. If there is no error, the value will be “No error here”. We have also made an IFNOTERROR exercise, where you can try this for yourself.

What error values are checked by IFERROR?

#DIV/0, #N/A, #REF, #VALUE, #NUM, #NAME and #NULL.

​Get Good at Excel on Autopilot

Sign up to our newsletter and receive ​Excel articles, tips and tricks delivered straight to your inbox. All you have to do is read them! ​Plus, to get you started, you'll receive a PDF with 200+ Excel shortcuts.

>