Documentation/How Tos/Calc: N function
From Apache OpenOffice Wiki
N
Returns the numeric value.
Syntax:
N(value)
- This function returns the numeric value of value if possible and 0 otherwise. It returns the logical values TRUE and FALSE as 1 and 0 respectively, and converts text representing a number to that number. It returns non-numeric text and errors as 0.
Example:
N(123)
- returns 123, because 123 is (already) a number.
N(TRUE)
- returns 1.
N(A3)
- where A3 contains FALSE, returns 0.
N("abc")
- returns 0, because "abc" is text which cannot be converted to a number.
N("1.23")
- returns 1.23 as a number.