How do I format a date or number as text in a specific way?
The TEXT formula converts a number or date into text using a format code you choose: =TEXT(value, format_code). For example =TEXT(A2,"mmmm d, yyyy") turns a date into "July 20, 2026" regardless of how the cell was originally formatted.
Formula (Excel and Google Sheets)
=TEXT(A2,"mmmm d, yyyy")TEXT is useful whenever you need a date or number to appear a specific way inside a sentence built with other text, since combining a raw date cell with text using & often shows an unwanted serial number instead of a readable date. Common date codes: "yyyy-mm-dd" for 2026-07-20, "mmm d" for Jul 20, "dddd" for the full weekday name. Common number codes: "0.0%" for a percentage with one decimal, "$#,##0" for currency with thousands separators.
A frequent use is building a sentence like ="Report for "&TEXT(A2,"mmmm yyyy"), which reads naturally instead of showing a raw date serial number.
Step by step
- 1
Identify the value
This is the cell holding your date or number.
- 2
Choose a format code
Pick a code matching how you want it to look, e.g. "mmmm d, yyyy" for a long date or "0.0%" for a percentage.
- 3
Combine with other text if needed
Join the TEXT result with & and literal text in quotes to build a full sentence.
Common questions
Why does concatenating a date with & show a number instead of a date?
Combining a date cell with text using & converts the date to its underlying serial number. Wrap the date in TEXT first to keep it readable.
Can TEXT format currency?
Yes, e.g. =TEXT(A2,"$#,##0.00") formats a number as currency with two decimal places.
Related formulas
How to Combine Text from Multiple Cells with CONCATENATE and TEXTJOIN
RelatedHow to Calculate Percentage Change Between Two Numbers
RelatedHow to Remove Duplicate Rows in Excel and Google Sheets
From the blogHow to Make Sense of Your Spreadsheet Data Without Being an Analyst
Want a formula written for your exact spreadsheet, not a generic example?
Try the free formula generator