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

From Apache OpenOffice Wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
{{Documentation/MasterTOC
+
{{DISPLAYTITLE:TEXT 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:_T_function
|ShowNextPage=block|NextPage=Documentation/How_Tos/Calc:_TRIM_function
+
|NextPage=Documentation/How_Tos/Calc:_TRIM_function
|ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc:_T_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%;">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%; border-style: double; border-color:#778899;">Text]]
+
* [[Documentation/How_Tos/Calc:_TRIM_function|<div style="font-size: 120%;">Trim]]
+
* [[Documentation/How_Tos/Calc:_UNICHAR_function|<div style="font-size: 120%;">Unichar]]
+
* [[Documentation/How_Tos/Calc:_UNICODE_function|<div style="font-size: 120%;">Unicode]]
+
* [[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__
+
 
+
  
 
== TEXT ==
 
== TEXT ==
Line 45: Line 13:
 
: returns <tt>'''number'''</tt> converted to text, according to the format code specified by <tt>'''format'''</tt>.
 
: returns <tt>'''number'''</tt> converted to text, according to the format code specified by <tt>'''format'''</tt>.
  
: Example format codes are found in the '''Format - Cells...''' dialogue, in the box labelled Format Code. These depend on your locale.
+
: Example format codes are found in the {{menu|Format|Cells…}} dialogue, in the box labelled Format Code. These depend on your locale.
  
 
: This function should therefore '''not''' be regarded as portable.
 
: This function should therefore '''not''' be regarded as portable.

Revision as of 15:42, 2 February 2024



TEXT

Converts a number into text according to a given format.

Syntax:

TEXT(number; format)

returns number converted to text, according to the format code specified by format.
Example format codes are found in the Format → Cells… dialogue, in the box labelled Format Code. These depend on your locale.
This function should therefore not be regarded as portable.

Example:

TEXT(12.34567;"###.##")

returns the text 12.35, if in your locale ###.## is a format code meaning "up to three integer digits and at most two decimal digits".



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