The Excel N function returns a number when given a value. The N function can be used to convert TRUE and FALSE to 1 and 0 respectively. When given a text value, the N function returns zero.
Syntax:= N (value)
The N function syntax has the following arguments: Value Required. The value you want converted. N converts values listed in the following table.
|If value is or refers to||N returns|
|A number||That number|
|A date, in one of the built-in date formats available in Microsoft Excel||The serial number of that date|
|An error value, such as #DIV/0!||The error value|
Example: Let’s look at some Excel N function examples and explore how to use the N function as a worksheet function in Microsoft Excel:
Based on the Excel spreadsheet above, the following N examples would return:
- When range of cells given as argument, the function only checks the first cell of the array as returns TRUE or FALSE based only on the first cell.
- The function returns 1 for TRUE logical value but returns 0 for FALSE.