Difference between revisions of "Documentation/How Tos/Calc: VALUE function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
m (Example:)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{DISPLAYTITLE:VALUE function}}
 +
{{Documentation/CalcFunc TextTOC
 +
|ShowPrevNext=block
 +
|PrevPage=Documentation/How_Tos/Calc:_UPPER_function
 +
|NextPage=none
 +
}}__NOTOC__
  
 
== VALUE ==
 
== VALUE ==
Line 13: Line 18:
  
 
<tt>'''VALUE("1,234.56")'''</tt>
 
<tt>'''VALUE("1,234.56")'''</tt>
: returns <tt>'''1234.56'''</tt> if your locale recognises the thousands separator ',' and decimal point '.'.
+
: returns <tt>'''1234.56'''</tt> if your locale recognizes the thousands-separator ',' and decimal point '.'.
  
 
<tt>'''VALUE("1 1/2")'''</tt>
 
<tt>'''VALUE("1 1/2")'''</tt>
Line 24: Line 29:
 
: returns <tt>'''0.5'''</tt> (percentage).
 
: returns <tt>'''0.5'''</tt> (percentage).
  
<tt>'''VALUE("2009-04-03")'''</tt>
+
<tt>'''VALUE("2019-04-03")'''</tt>
: returns the datetime serial number for 3rd April 2009.
+
: returns the datetime serial number for 3rd April 2019.
  
{{Documentation/SeeAlso|
+
{{SeeAlso|EN|
 
* [[Documentation/How_Tos/Calc: TEXT function|TEXT]]
 
* [[Documentation/How_Tos/Calc: TEXT function|TEXT]]
 
* [[Documentation/How_Tos/Calc: T function|T]]
 
* [[Documentation/How_Tos/Calc: T function|T]]

Latest revision as of 14:28, 21 February 2024



VALUE

Returns a number, given a text representation.

Syntax:

VALUE(text)

converts text to a number. text may represent: a number, including fractions, exponential notation and (locale dependent) decimal point and thousands separator; a percentage; or a date or time (the datetime serial number is returned).

Example:

VALUE("12")

returns 12 as a number.

VALUE("1,234.56")

returns 1234.56 if your locale recognizes the thousands-separator ',' and decimal point '.'.

VALUE("1 1/2")

returns 1.5 (fraction).

VALUE("1E3")

returns 1000 (exponential notation).

VALUE("50%")

returns 0.5 (percentage).

VALUE("2019-04-03")

returns the datetime serial number for 3rd April 2019.



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_VALUE_function&oldid=260140"
Views
Personal tools
Navigation
Tools