FormulaCamp
Completed
← Google Sheets functions
Google Sheets function

TEXT in Google Sheets

TEXT format codes in Google Sheets are read according to the spreadsheet locale (File, Settings), which affects separators and month names.

Syntax (same in Google Sheets)

TEXT(value, format_text)

If a code gives a different layout from the one shown here, check that setting first.

For a fuller explanation of the arguments and common errors, see the TEXT Excel guide.

Worked examples in Google Sheets

Currency with thousands separator

A
1Amount
21234.5

Formula: C1: =TEXT(A2,"$#,##0.00")

Result: $1,234.50

#,##0 adds the thousands separator, 0.00 forces two decimals.

Readable date

A
1Date
23/9/2024

Formula: C1: =TEXT(A2,"mmm d, yyyy")

Result: Mar 9, 2024

mmm is the short month name, d the day, yyyy the four-digit year. Use "dddd" for the weekday name.

Leading zeros

A
1Invoice
242

Formula: C1: =TEXT(A2,"00000")

Result: 00042

Each 0 is a mandatory digit, so 42 is padded to five characters.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in D2: =TEXT(A2,"#,##0.00")

Example spreadsheet for TEXT
ABCD
1NumberStepResult
21234.567501,234.57
3175
4-4.712
51449
62.53
75012
Result in D2: 1,234.57
Practice this in a lesson: The TEXT and VALUE Functions

Frequently asked questions

Why does TEXT show a different date or number layout in Google Sheets?
The format code is interpreted in the spreadsheet locale, so decimal marks, thousands separators and month names follow File, Settings, Locale.

Google Sheets is used here only as a descriptive product name. FormulaCamp is not affiliated with Google.