IFERROR Excel function returns a custom error message in case of an Excel error.

An Excel error can be one of the following:

  • #N/A – Value not found
  • #DIV/0 – Division by zero
  • #REF – Cell/Range reference error. Example: formula references a deleted row.
  • #NAME – Invalid name error, usually happens when a formula name is not spelled correctly.
  • #VALUE – Value error (can happen when a formula is used incorrectly)

For a normal user, these error messages have no meaning, therefore IFERROR can help the user understand what’s the reason for the problem, by adding custom text explaining what went wrong.

IFERROR is extremely popular when used combined with VLOOKUP



value – The value we want to check whether it’s erroneous or not.

value_if_error – This is the text/cell to return if value is erroneous.

Here’s an example for VLOOKUP combined with an IFERROR, which returns “Value not found” in case of an error:

=IFERROR(vlookup(a1,b1:c4,2,0),”Value not found”)

Practice IFERROR function

Now, let’s try the IFERROR function!