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

From Apache OpenOffice Wiki
Jump to: navigation, search
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation/MasterTOC
+
{{DISPLAYTITLE:FIXED function}}
|bookid=1234'''
+
{{Documentation/CalcFunc TextTOC
|booktitle=<div style="padding: 8px; font-size: 140%; font-weight: bold; background-color: #9BC0F5;">CALC FUNCTIONS</div>
+
|ShowPrevNext=block
|ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Text_functions|<div style="font-size: 140%;">Text Functions]]
+
|PrevPage=Documentation/How_Tos/Calc:_FIND_function
|ShowNextPage=block|NextPage=Documentation/How_Tos/Calc:_LEFT_function
+
|NextPage=Documentation/How_Tos/Calc:_LEFT_function
|ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc:_FIND_function
+
}}__NOTOC__
|ShowPrevPart=block|PrevPart=Documentation/How_Tos/Calc:_Statistical_functions
+
|ShowNextPart=block|NextPart=Documentation/Reference/Calc_functions
+
|toccontent= <div style="padding: 4px; font-size: 130%; font-weight: hidden; background-color:#DCE9FC;">FUNCTIONS</div>
+
 
+
* [[Documentation/How_Tos/Calc:_BASE_function|<div style="font-size: 120%;">Base]]
+
* [[Documentation/How_Tos/Calc:_CHAR_function|<div style="font-size: 120%;">Char]]
+
* [[Documentation/How_Tos/Calc:_CLEAN_function|<div style="font-size: 120%;">Clean]]
+
* [[Documentation/How_Tos/Calc:_CODE_function|<div style="font-size: 120%;">Code]]
+
* [[Documentation/How_Tos/Calc:_CONCATENATE_function|<div style="font-size: 120%;">Concatenate]]
+
* [[Documentation/How_Tos/Calc:_DOLLAR_function|<div style="font-size: 120%;">Dollar]]
+
* [[Documentation/How_Tos/Calc:_EXACT_function|<div style="font-size: 120%;">Exact]]
+
* [[Documentation/How_Tos/Calc:_FIND_function|<div style="font-size: 120%;">Find]]
+
* [[Documentation/How_Tos/Calc:_FIXED_function|<div style="font-size: 120%; border-style: double; border-color:#778899;">Fixed]]
+
* [[Documentation/How_Tos/Calc:_LEFT_function|<div style="font-size: 120%;">Left]]
+
* [[Documentation/How_Tos/Calc:_LEN_function|<div style="font-size: 120%;">Len]]
+
* [[Documentation/How_Tos/Calc:_LOWER_function|<div style="font-size: 120%;">Lower]]
+
* [[Documentation/How_Tos/Calc:_MID_function|<div style="font-size: 120%;">Mid]]
+
* [[Documentation/How_Tos/Calc:_PROPER_function|<div style="font-size: 120%;">Proper]]
+
* [[Documentation/How_Tos/Calc:_REPLACE_function|<div style="font-size: 120%;">Replace]]
+
* [[Documentation/How_Tos/Calc:_REPT_function|<div style="font-size: 120%;">Rept]]
+
* [[Documentation/How_Tos/Calc:_RIGHT_function|<div style="font-size: 120%;">Right]]
+
* [[Documentation/How_Tos/Calc:_SEARCH_function|<div style="font-size: 120%;">Search]]
+
* [[Documentation/How_Tos/Calc:_SUBSTITUTE_function|<div style="font-size: 120%;">Substitute]]
+
* [[Documentation/How_Tos/Calc:_T_function|<div style="font-size: 120%;">T]]
+
* [[Documentation/How_Tos/Calc:_TEXT_function|<div style="font-size: 120%;">Text]]
+
* [[Documentation/How_Tos/Calc:_TRIM_function|<div style="font-size: 120%;">Trim]]
+
* [[Documentation/How_Tos/Calc:_UPPER_function|<div style="font-size: 120%;">Upper]]
+
* [[Documentation/How_Tos/Calc:_VALUE_function|<div style="font-size: 120%;">Value]]
+
}}__TOC__
+
  
 
== FIXED ==
 
== FIXED ==
Line 40: 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>

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