
The Excel ISNA function returns TRUE when a cell contains the #N/A error and FALSE for any other value, or any other error type. You can use the ISNA function with the IF function test for an error and display a friendly message when it appears.
Test for the #N/A error
A logical value (TRUE or FALSE)
=ISNA (value)
Use the ISNA function to check to check for #N/A errors. Normally, value is supplied as a cell reference. For example, if A1 contains #N/A, the following formula will return TRUE:
=ISNA(A1)
To explicitly force the #N/A error in a formula, you can use the NA function. The following will return true:
=ISNA(NA())
Notes:

The Excel ISNA function returns TRUE when a cell contains the #N/A error and FALSE for any other value, or any other error type. You can use the ISNA function with the IF function test for an error and display a friendly message when it appears.
Test for the #N/A error
A logical value (TRUE or FALSE)
=ISNA (value)
Use the ISNA function to check to check for #N/A errors. Normally, value is supplied as a cell reference. For example, if A1 contains #N/A, the following formula will return TRUE:
=ISNA(A1)
To explicitly force the #N/A error in a formula, you can use the NA function. The following will return true:
=ISNA(NA())
Notes: