TEXT in Google Sheets
Formats a number as text with a number format code, for example to put it inside a sentence.
In Google Sheets
TEXT works as in Excel and takes the same format codes, such as "0%", "#,##0.00" and "mmm d, yyyy". Google Sheets reads the codes in English whatever the spreadsheet's language, so the year is always yyyy.
Syntax
TEXT(value, format_text)- value
- The number or date to format.
- format_text
- A format code in quotes, such as "0%", "00000" or "dd-mm-yyyy".
Examples
B1
=TEXT(10.25,2"0%")| A | B | |
|---|---|---|
| 1 | 25% |
In plain words: Show 10.25 2as a percentage with no decimals.
B1=TEXT(42,"00000")
| A | B | |
|---|---|---|
| 1 | 00042 |
B1=TEXT(1234.5,"#,##0.00")
| A | B | |
|---|---|---|
| 1 | 1,234.50 |
B1=TEXT(DATE(2024,3,5),"dd-mm-yyyy")
| A | B | |
|---|---|---|
| 1 | 05-03-2024 |