Wednesday, January 06, 2021

ISERROR Function In Excel With Example

ISERROR ()

This function tests a cell or calculation to determine whether an error has been generated.


It will show TRUE for any type of error and FALSE if no error is found.


Best view in desktop mode.


A

B

C

D

1

Cell to Test

Result

2

3

FALSE

=ISERROR(A2)

3

#DIV/0!

TRUE

=ISERROR(A3)

4

#NAME?

TRUE

=ISERROR(A4)

5

#REF!

TRUE

=ISERROR(A5)

6

#VALUE!

TRUE

=ISERROR(A6)

7

#N/A

TRUE

=ISERROR(A7)

8

 

 

Syntax

=ISERROR (Cell)

  

 

Formatting

No special formatting is needed. Used by itself the result will be shown as TRUE or FALSE.

 

 

 

 

Example

The following tables were used to calculate the difference between two dates.

 

Table 1 shows an error value when entered an incorrect date format.

The #VALUE! indicates that the calculation cannot be done due to an incorrect format.

 

Table 1

 

A

B

C

D

12

Start Date :

Jan 01 21

13

End Date :

05-Jan-21

14

Difference :

#VALUE!

 =B13-B12

15

 

 

 

Table 2 shows how this error can be trapped by using the ISERROR function with IF function.

IF function checks the condition for true result and gives a message defined by the user. There has been an error in the data entry.

 

Table 2

 

A

B

C

D

18

Start Date :

Jan 01 21

19

End Date :

05-Jan-21

20

Difference :

Enter Correct Format!

 =IF(ISERROR(B19-B18),"Enter Correct Format!",B19-B18)

21

 

 

Table 3 shows when the date entered in the correct format, it shows the calculated value. IF function checks the condition for the false result then minus formula works and calculates the difference value.

 

Table 3

 

A

B

C

D

24

Start Date :

01-Jan-21

25

End Date :

05-Jan-21

26

Difference :

4

 =IF(ISERROR(B25-B24),"Enter Correct Format!",B25-B24)

27

 

 

 

 

ISERR in Excel

<<  Previous

Next  >>

ISEVEN in Excel

                       

 

 

 

 

No comments:

Post a Comment