You are learning Error Handling in MS Excel
How to use the ISErr function to check for specific error types?
The ISErr function in Excel is actually designed to identify most error types except #N/A. It doesn't check for specific errors on its own. However, you can combine ISErr with other logical functions like IF or ISERROR to achieve what you need.
Here's how to use ISErr for specific error checking:
1. Using IF with ISErr (Check for any error except #N/A):
```excel
=IF(ISErr(A1), "There is an error", A1)
```
This formula checks cell A1. If it contains any error except #N/A, it will display the text "There is an error." Otherwise, it will display the value in cell A1.
2. Using IF with ISERROR (Check for any error):
```excel
=IF(ISERROR(A1), "There is an error", A1)
```
This formula uses ISERROR instead of ISErr. ISERROR will catch all error types, including #N/A. So, it will display "There is an error" for any error in A1.
3. Identifying Specific Errors (Using IF with other functions):
While ISErr doesn't check for specific errors directly, you can combine it with logical operators and other functions like ISNA to achieve this:
```excel
=IF(ISNA(A1), "There is a #N/A error",
IF(ISERR(A1), "There is a different error", A1))
```
This formula checks cell A1 first for a #N/A error using ISNA. If it's #N/A, it displays a specific message. Then, it uses ISErr within another IF statement to check for any other errors (excluding #N/A) and displays a different message if found. Otherwise, it displays the value in A1.
Remember, you can replace the text messages with any desired output based on the error type.