How To Show Custom Error Message When Executing Excel Formula

When you input an Excel formula in an Excel cell and execute it, you may encounter some error message like #N/A. But this kind of error message is not readable and understandable. This article will tell you how to show customized error messages to replace the default error message when the formula throws an error.

1. How To Show Custom Error Message When Executing Excel Formula.

  1. We can use the Excel IFERROR function to define and show a custom error message when an error is thrown in the formula.
  2. Below is the IFERROR function’s syntax.
    IFERROR(value, value_if_error)
  3. The first argument is the formula that may throw the error, and the second argument is the user-defined error message that will be shown when the first argument formula throws an error.
  4. For example, if the formula MATCH(850, B2:B7, -1) throws the error #N/A, and you want to show a custom error message.
  5. Then you can use the formula =IFERROR(MATCH(850, B2:B7, -1), “Can not find the value”) to replace the formula =MATCH(850, B2:B7, -1).
  6. Now when the formula =MATCH(850, B2:B7, -1) throws the error #N/A, the above formula will show the error message Can not find the value instead of the default error message #N/A.
  7. If the formula does not throw any error, then it will execute the formula and show the formula result in the cell.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.