Syntax
=TEXT(value, format_text)Arguments
| Argument | Required | Description |
|---|---|---|
value | Required | The number (or numeric text) to format |
format_text | Required | A number format code in quotes |
How to use TEXT
TEXT takes 2 required arguments. Type =TEXT( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=TEXT(1234.567, "$#,##0.00")Result =TEXT(0.285, "0.0%")Result =TEXT(45292, "yyyy-mm-dd")Result Related text functions
- SEARCHBSame as SEARCH, counting bytes; without a double byte language set as default each character counts as one byte.
- SPLITSplits text at a delimiter into a row of cells.
- SUBSTITUTEReplaces existing text with new text, everywhere or only in one occurrence.
- TReturns the value if it is text, otherwise empty text.
- TEXTAFTERReturns the text that comes after a delimiter.
- TEXTBEFOREReturns the text that comes before a delimiter.
- TEXTJOINJoins texts and ranges with a delimiter between them, optionally skipping empty values.
- TEXTSPLITSplits text into columns and rows at the delimiters you give.
- TO_DATEReturns a number as a date value (the number itself; text and other values are returned unchanged).