The Excel NA function returns the #N/A error. #N/A means “not available” or “no value available”. You can nest the NA function inside a formula to display the #N/A error when information is missing.
Syntax:= NA ()
The NA function syntax has the following arguments:
- The NA function syntax has no arguments.
Example: Let’s look at some Excel NA function examples and explore how to use the NA function as a worksheet function in Microsoft Excel:
We need to find out the Total price for all the fruits and do not want 0 in return.
We will use the formula:
B2 = “” : condition to check for empty cells that we will return 0
NA() : value if condition is True.
B2*C2 : value if condition is False
As you can see the formula returns value error where condition stands True.
Based on the Excel spreadsheet above, the following NA examples would return:
- 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.