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.
With large sets of data, exact match VLOOKUP can be painfully slow, but you can make VLOOKUP lightening fast by using two VLOOKUPS, as explained below.
If you have a smaller set of data, this approach is...
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.