Uji kesalahan #N/A
=ISNA(value)
| Parameter | Deskripsi |
|---|---|
value |
The value to check if #N/A. |
If A1 contains the #N/A error, ISNA returns TRUE:
=ISNA(A1) // returns TRUE
ISNA returns FALSE for other values and errors:
=ISNA(100) // returns FALSE
=ISNA(5/0) // returns FALSE
You can use the ISNA function with the IF function test for #N/A and display a friendly message if the error occurs. For example, to display a message
=IF(ISNA(A1),"message",A1)
To explicitly return the #N/A error in a formula, you can use the NA function:
=NA() // returns #N/A error
The following will return true:
=ISNA(NA()) // returns TRUE
To count cells in a range that contain #N/A errors, you can use the SUMPRODUCT function like this:
=SUMPRODUCT(--ISNA(range))