Difference between revisions of "Documentation/How Tos/Calc: TEXT function"
From Apache OpenOffice Wiki
		< Documentation | How Tos
		
		
 (Initial content)  | 
				m  | 
				||
| (10 intermediate revisions by 6 users not shown) | |||
| Line 1: | Line 1: | ||
| − | __NOTOC__  | + | {{DISPLAYTITLE:TEXT function}}  | 
| + | {{Documentation/CalcFunc TextTOC  | ||
| + | |ShowPrevNext=block  | ||
| + | |PrevPage=Documentation/How_Tos/Calc:_T_function  | ||
| + | |NextPage=Documentation/How_Tos/Calc:_TRIM_function  | ||
| + | }}__NOTOC__  | ||
== TEXT ==  | == TEXT ==  | ||
| Line 8: | 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   | + | : 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.  | ||
| Line 14: | Line 19: | ||
=== Example: ===  | === Example: ===  | ||
<tt>'''TEXT(12.34567;"###.##")'''</tt>  | <tt>'''TEXT(12.34567;"###.##")'''</tt>  | ||
| − | : returns the text <tt>'''12.35'''</tt>, if in your locale <tt>'''###.##'''</tt>   | + | : returns the text <tt>'''12.35'''</tt>, if in your locale <tt>'''###.##'''</tt> in a format code meaning: "up to three integer digits and at most two decimal digits".  | 
| − | + | {{SeeAlso|EN|  | |
| − | + | * [[Documentation/How_Tos/Calc: T function|T]]  | |
| − | + | * [[Documentation/How_Tos/Calc: VALUE function|VALUE]]  | |
| − | + | * [[Documentation/How_Tos/Calc: N function|N]]  | |
| − | + | * [[Documentation/How_Tos/Calc: Text functions|Text functions]]  | |
| + | |||
| + | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]  | ||
| + | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}  | ||
| + | [[Category: Documentation/Reference/Calc/Text functions]]  | ||
Latest revision as of 11:00, 25 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 ###.## in a format code meaning: "up to three integer digits and at most two decimal digits".
 
See Also