Create an #N/A error
The NA function returns the #N/A error:
=NA() // returns #N/A
You can use the NA function in other formulas. For example, in the formula below, the IF function is configured to test if cell A1 is empty. If so, IF
=IF(A1="",NA(),A1*B1) // #N/A if A1 is empty
You can use the NA function to indicate missing information. In the worksheet shown above, cells C9 and C13 contain the NA function:
=NA()
This indicates that cost is not available. In cell D5, the formula copied down is:
=B5*C5 // qty * cost
In cells D9 and D13, the formula returns #N/A because C9 and C13 contain errors. In cell D15 the SUMIF function is used to sum values in column D whil
=SUMIF(D5:D13,"<>#N/A") // ignore #N/A
If the SUM function was used instead, it would return #N/A:
=SUM(D5:D13) // would return #N/A