Documentation/How Tos/Calc: N function

From Apache OpenOffice Wiki
< Documentation‎ | How Tos
Revision as of 20:15, 6 December 2007 by Drking (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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.


See also:

ISNUMBER function

Information functions

Personal tools