Format numbers as text by applying format codes.
TEXT(value, format_text)
Apply format codes to numbers to format them as text and, optionally, embed them inside text strings. The TEXT function can be applied to either defined values (e.g. 1234), cell references (e.g. C3) or the result of other formulas.
TEXT syntax requires the 'defined value or cell reference to be formatted' and 'the format code to apply'.
TEXT examples
In the examples below, the TEXT function is used to format numbers in a variety of formats, from currency to fractions to scientific or custom formats.
Use the TEXT function to format numbers as text by applying format codes.

Syntax
TEXT(value, format_text)
The TEXT function consists of 2 arguments:
- value. Required. The number to format.
- format_text. Required. The format code to apply.
Try it now!
Enter your formulas into the grey cells.
Scope
The TEXT function can be applied to defined numeric values, cell references or the results of other formulas.
|
=TEXT(1234.567,"$#,##0.0") || returns the text string '$1,234.6'. |
|
=TEXT((C3/C4),"0%") || returns the text string '25%' if cell C3 = 25 and cell C4 = 100. |
|
=TEXT(TODAY(),"dd-mmm-yyyy") || returns '26-Mar-2022' as today's date. |
|
="Today's date is "&TEXT(TODAY(),"dd-mmm-yyyy") || returns 'Today's date is 26-Mar-2022'. |
Caveats
- The TEXT function returns a number formatted as text.
- The format_text argument must appear in double quotation marks.
- It is recommended to retain the original value in case further calculations using that number are required. Referencing a value formatted by the TEXT function may be difficult later.
- The TEXT function can be combined with other text functions to format longer text strings. For example, ="Today's date is"&CHAR(10)&"&UPPER(TEXT(TODAY(),"dd-mmm-yyyy")) || returns 'Today's date is' followed by a line break (using the CHAR function) and then the uppercase date '26-MAR-2022' (using the UPPER function).
Functions Category