When the quantity is missing, there isn't enough data to run the calculation.,so the formula checks to see if the cell in column B is blank. If so, it returns the #N/A error using NA. If a value exists, the normal calculation is run.
When other formulas refer to cells that contain #N/A, they also return #N/A.
NA takes no arguments, but you must provide empty parentheses.
You can also enter the value #N/A directly into a cell as text.
The first instance of VLOOKUP simply looks up the lookup value (the id in this example):
and returns TRUE only when the lookup value is found. In that case,
the formula runs VLOOKUP...
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...
The Excel ISERR function returns TRUE for any error type except the #N/A error. You can use the ISERR function together with the IF function to test for an error and display a custom message, or perform a different calculation if found.
The Excel IFERROR function returns a custom result when a formula generates an error, and a standard result when no error is detected. IFERROR is an elegant way to trap and manage errors without using more complicated nested IF statements.