Related Topics: | ||
Description: Converts the specified value to a number. For example, if the value is a date, returns the serial number; if the value is TRUE, returns 1; if the value if FALSE, returns 0.
Syntax: N(Value)
Value is the value you want converted. N converts values as listed in the following table.
If Value is or refers to | N returns |
A number | Value |
A date, in one of the built-in date formats available in the software | The serial number of that date |
TRUE | 1 |
FALSE | 0 |
An error value, such as #DIV/0! | The error value |
Anything else | 0 |
Remarks:
It is not generally necessary to use the N function in a formula, because the software automatically converts values as necessary. This function is provided for compatibility with other spreadsheet programs.
The software stores dates as sequential serial numbers so they can be used in calculations. January 1, 1900 is serial number 1, and January 1, 2011 is serial number 40544 because it is 40,544 days after January 1, 1900. (See the NOW function.)
Example:
Suppose A1 contains "7", A2 contains "Even", A3 contains "TRUE", and A4 contains "4/17/2011".
N(A1) = 7 [because A2 contains a number, 7 is returned]
N(A2) = 0 [because A3 contains text, 0 is returned]
N(A3) = 1 [because A4 is the logical value TRUE, 1 is returned]
N(A4) = 40650 [because A5 is a date, the serial number is returned]
N("7") = 0 [because "7" is text, 0 is returned]
© 1992-2015. ReliaSoft Corporation. ALL RIGHTS RESERVED.