How To Show Custom Error Message When Executing Excel Formula

When you input an excel formula in 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 message to replace the default error message when the formula throw error.

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

  1. We can use the excel IFERROR function to define and show 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 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 do not throw any error, then it will execute the formula and show the formula result in the cell.

Subscribe to learn more excel tricks.

We don’t spam!

close

Subscribe to learn more excel tricks.

We don’t spam!

0 0 votes
Article Rating
Subscribe
Notify of
guest

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

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x