Text
TEXT function playground
Turns a number or date into text with the format you choose.
The playground runs in your browser. Nothing you type is sent anywhere.
How TEXT works
TEXT applies a number format code and returns the result as text. That is useful when you join numbers or dates with words, because joining alone loses the formatting.
Common codes: 0 and # for digits, , for thousands, % for percent, yyyy/mm/dd for dates, mmm for a short month name and dddd for the weekday.
Syntax
=TEXT(value, format_text)| Argument | What it means |
|---|---|
valuerequired | The number or date to format. |
format_textrequired | A format code in quotes, such as "$#,##0.00" or "mmm d, yyyy". |
Examples
| Formula | What it does | Result |
|---|---|---|
=TEXT(A2,"dddd, mmm d") | The sale date with the weekday. | Monday, Jan 5 |
=TEXT(F2,"$#,##0") | Revenue as currency with no cents. | $3,600 |
="Revenue: "&TEXT(F2,"$#,##0.00") | Join text and a formatted number. | Revenue: $3,600.00 |
=TEXT(E2/SUM(E2:E11),"0.0%") | Share of all units, as a percentage. | 9.4% |
=TEXT(A2,"yyyy-mm-dd") | An ISO-style date. | 2026-01-05 |
Common mistakes
Result is textYou can't do maths with the result. Keep the original number for calculations.
Codes depend on languageFormat codes can differ in other language versions of Excel.
Related functions
Learn more
Download the example workbook (.xlsx)
The workbook has the same sample data and formulas, plus a practice sheet.