Difference between revisions of "Documentation/How Tos/Calc: N function"
From Apache OpenOffice Wiki
< Documentation | How Tos
OOoWikiBot (Talk | contribs) m (Robot: Automated text replacement %s) |
m |
||
Line 23: | Line 23: | ||
: where A3 contains <tt>'''FALSE'''</tt>, returns <tt>'''0'''</tt>. | : where A3 contains <tt>'''FALSE'''</tt>, returns <tt>'''0'''</tt>. | ||
+ | ===Issues: === | ||
+ | <tt>'''N()'''</tt> in Calc will convert text to a number, but in Excel it will not. The ODFF standard deliberately does not specify a behaviour. Use <tt>'''VALUE()'''</tt> to convert from text to number. | ||
{{Documentation/SeeAlso| | {{Documentation/SeeAlso| | ||
Line 36: | Line 38: | ||
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | ||
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | ||
− | |||
− | |||
− |
Revision as of 16:21, 2 March 2009
N
Returns the numeric value.
Syntax:
N(value)
- returns the numeric value of value if possible. It returns the logical values TRUE and FALSE as 1 and 0 respectively.
- N() is not intended to convert text to a number - use the VALUE() function instead.
Example:
N(123)
- returns 123, because 123 is (already) a number.
N(TRUE)
- returns 1.
N(A3)
- where A3 contains FALSE, returns 0.
Issues:
N() in Calc will convert text to a number, but in Excel it will not. The ODFF standard deliberately does not specify a behaviour. Use VALUE() to convert from text to number.