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(0.25,"0%")
AB
125%

In plain words: Show 0.25 as a percentage with no decimals.

B1=TEXT(42,"00000")
AB
100042
B1=TEXT(1234.5,"#,##0.00")
AB
11,234.50
B1=TEXT(DATE(2024,3,5),"dd-mm-yyyy")
AB
105-03-2024

Related functions