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

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Automated text replacement %s)
m
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{DISPLAYTITLE:FIXED function}}
 +
{{Documentation/CalcFunc TextTOC
 +
|ShowPrevNext=block
 +
|PrevPage=Documentation/How_Tos/Calc:_FIND_function
 +
|NextPage=Documentation/How_Tos/Calc:_LEFT_function
 +
}}__NOTOC__
  
 
== FIXED ==
 
== FIXED ==
Line 6: Line 11:
 
=== Syntax: ===
 
=== Syntax: ===
 
<tt>'''FIXED(number; decimals; omitseparators)'''</tt>
 
<tt>'''FIXED(number; decimals; omitseparators)'''</tt>
: returns text representing <tt>'''number'''</tt> with <tt>'''decimals'''</tt> decimal places. If <tt>'''omitseparators'''</tt> (optional) is <tt>'''TRUE'''</tt> thousands separators will be omitted. In the absence of <tt>'''omitseparators'''</tt> thousands separators are included.
+
: returns text representing <tt>'''number'''</tt> with <tt>'''decimals'''</tt> decimal places. If <tt>'''omitseparators'''</tt> (optional) is <tt>'''TRUE'''</tt> thousands-separators will be omitted. In the absence of <tt>'''omitseparators'''</tt> thousands separators are included.
  
: The thousands separator character used is dependent on your locale settings; see  '''Tools - Options - Language Settings - Languages'''.
+
: The thousands-separator character used is dependent on your locale settings; see  {{menu|Tools|Options|Language Settings|Languages}}.
  
 
=== Example: ===
 
=== Example: ===
 
<tt>'''FIXED(1234567.89; 3)'''</tt>
 
<tt>'''FIXED(1234567.89; 3)'''</tt>
: returns <tt>'''1,234,567.890'''</tt> as text, if your locale uses a comma as the thousands separator.
+
: returns <tt>'''1,234,567.890'''</tt> as text, if your locale uses a comma as the thousands-separator.
  
 
<tt>'''FIXED(1234567.89; 3; TRUE)'''</tt>
 
<tt>'''FIXED(1234567.89; 3; TRUE)'''</tt>
Line 23: Line 28:
  
  
{{Documentation/SeeAlso|
+
{{SeeAlso|EN|
 
* [[Documentation/How_Tos/Calc: TEXT function|TEXT]]
 
* [[Documentation/How_Tos/Calc: TEXT function|TEXT]]
 
* [[Documentation/How_Tos/Calc: DOLLAR function|DOLLAR]]
 
* [[Documentation/How_Tos/Calc: DOLLAR function|DOLLAR]]
Line 31: Line 36:
 
* [[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]]}}
[[Category: Documentation/Reference/Calc]]
+
[[Category: Documentation/Reference/Calc/Text functions]]

Latest revision as of 15:31, 2 February 2024



FIXED

Returns a number as text with a specified format.

Syntax:

FIXED(number; decimals; omitseparators)

returns text representing number with decimals decimal places. If omitseparators (optional) is TRUE thousands-separators will be omitted. In the absence of omitseparators thousands separators are included.
The thousands-separator character used is dependent on your locale settings; see Tools → Options → Language Settings → Languages.

Example:

FIXED(1234567.89; 3)

returns 1,234,567.890 as text, if your locale uses a comma as the thousands-separator.

FIXED(1234567.89; 3; TRUE)

returns 1234567.890 as text.

Issues:

  • Because it depends on locale settings, FIXED should not be regarded as portable.
  • The omitseparators parameter appears in the formula bar as a number, rather than TRUE or FALSE. This does not affect its function.




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