IFERROR

Returns a value you choose when a formula errors, and the formula's result otherwise.

Syntax

IFERROR(value, value_if_error)

Logical Functions.

Practise IFERROR1 interactive exercise, free, no account needed

A worked example

=IFERROR(C2/B2,"-")

Returns - when B2 is 0, the rate otherwise

Tries the division and shows a dash in place of #DIV/0! when there is nothing to divide by.

Where it goes wrong

It hides every error, including the #REF! and #NAME? you would want to see. Wrap only the part of a formula that can legitimately fail, not the whole thing.

Consider instead: XLOOKUP's own fallback argument, when the error you are catching is a lookup with no match.

What the exercises catch

Each of these is a wrong turn the practice exercises recognise and name. They are the misconceptions, not the answers.

  • Export has no orders this month, so this divides by zero and the report shows #DIV/0!. The division is right; it needs wrapping in something that catches the error and shows a dash instead.Replace #DIV/0! with a dash using IFERROR
  • That handles a zero, but only a zero — you have to predict every way the division could fail. IFERROR does the division and catches whatever goes wrong, which is the point of this exercise.Replace #DIV/0! with a dash using IFERROR

Practise IFERROR

Knowing what a function does and being able to write it from memory are different skills. These close the gap.

All IFERROR practice exercises →

Who practises IFERROR

Learn these first