TEXT
Short answer
Turn a number or date into a label, never into a total
TEXT(value, format_text)
- Category
- Text & Data Cleanup
- Excel version
- All versions
- Also searched as
- format number as text, dynamic header, dynamic report title, format code, date to text, chart title from cell, text function format, number to text
What it returns
TEXT converts a number into text, laid out by a format code. =TEXT(46112, "mmm-yy") returns the text Mar-26. =TEXT(0.0423, "0.0%") returns 4.2%.
Its job is labels: report titles, column headers, chart titles and commentary that follow the period input instead of being retyped every close.
The output is text. It looks like a number and is not one. SUM skips it, so a column of TEXT results totals to less than it shows, and nothing errors. If a cell needs to look different but stay a number, use a number format, not TEXT.
Arguments that matter
| Argument | Required | What it does |
|---|---|---|
value | Yes | The number or date to convert. A date is a number, so this is usually a period cell. |
format_text | Yes | A format code in quotes, written the same way as a custom number format. |
The format codes a model actually uses:
| Format code | 46112 (31-Mar-2026) or 13,151,000 becomes |
|---|---|
"mmm-yy" | Mar-26 |
"mmmm yyyy" | March 2026 |
"d mmm yyyy" | 31 Mar 2026 |
"#,##0" | 13,151,000 |
"#,##0.0,," | 13.2 (each trailing comma divides by 1,000) |
"+0.0%;-0.0%" | a signed percentage, such as +4.2% |
Format codes are language-specific. yyyy is a year code in English Excel. In a German-language Excel the year code is JJJJ, and a header built with "mmm yyyy" comes out wrong on that machine. If the file travels across languages, build the label from YEAR and MONTH, or keep dates as dates with a number format.
In a financial model
TEXT belongs on the presentation layer and nowhere upstream of a calculation.
The good uses:
- Report titles. “Q3 FY26 Actuals” or “March 2026 Management Accounts”, built from the period cell, so rolling forward is one input.
- Chart titles. A chart title linked to a cell that holds a TEXT formula updates with the period, which a typed title never does.
- Commentary lines. “Revenue +4.2% vs budget” built from the numbers, so the sentence cannot disagree with the table.
- Keys for a text lookup. A
yyyy-mmkey when a source system stores periods as text and the lookup must match it.
The bad use is formatting a number that something else will read. A summary tab that shows =TEXT(Calc!D20, "#,##0") to get commas has turned a number into a label. The commas belong in the number format, per the number format carries the unit, and the summary should link to the number, per nothing is calculated on an output tab.
Worked example
The period input sits in $C$3 as 31-Mar-2026. The company has a July fiscal year, so March is month 9 of FY26. Shifting the date forward six months lines the fiscal year up with the calendar: September 2026 sits in quarter 3 of calendar 2026, and March sits in quarter 3 of FY26. The fiscal calendar table guide builds the same labels once, as a table.
The report title:
="Q"&ROUNDUP(MONTH(EDATE($C$3,6))/3,0)&" FY"&TEXT(EDATE($C$3,6),"yy")&" Actuals"
EDATE($C$3,6) is 30-Sep-2026. Month 9 divided by 3 is quarter 3, and the year formats as 26. The result is Q3 FY26 Actuals. Move the input to 30-Apr-2026 and it reads Q4 FY26 Actuals.
A commentary line from actual revenue of 1,198,600 in D10 and budget of 1,150,000 in C10:
="Revenue "&TEXT(D10/C10-1,"+0.0%;-0.0%")&" vs budget"
Returns Revenue +4.2% vs budget. Without TEXT the joined cell would show the raw ratio, 0.0422608695652174.
Rolling 12-month revenue of 13,151,000 in D12, in millions for a chart label:
="Rolling 12: "&TEXT(D12,"#,##0.0,,")&"m"
Returns Rolling 12: 13.2m.
Old way vs new way
Joining a date without TEXT:
="Actuals to "&$C$3
Returns Actuals to 46112, the date’s serial number. With TEXT:
="Actuals to "&TEXT($C$3,"d mmmm yyyy")
Returns Actuals to 31 March 2026. Any time a number or date is joined into a sentence with &, it needs TEXT to keep its format.
Where it breaks
A total is lower than the numbers above it. Some of the cells are TEXT results, and SUM skips text without an error. Fix: remove TEXT from anything that is summed, and use a number format instead. A check of =SUMPRODUCT(--ISTEXT(D6:D40)) should read zero on any numeric block.
A header reads 46112. A date was joined with & and no TEXT. Fix: wrap the date in TEXT with the format you want shown.
A lookup against the header fails. The headers were built with TEXT, so they are text, and a real date never matches them. Fix: keep headers as real dates with a mmm-yy number format, per date headers are real dates.
The title is wrong on a colleague’s machine. Their Excel runs in another language, and the format codes in quotes mean something else there. Fix: build the label from YEAR, MONTH and a lookup of month names, or let a number format do the work on a real date.
A percentage label rounds differently from the table. TEXT rounds to the format, the table’s number format rounds the same value, and an upstream ROUND changed the value both read. Fix: point both at the same unrounded cell, so both round once, at display.
A text key matches nothing in the source data. One side is 2026-03 and the other is 2026-3. Fix: pad with the format code, TEXT(date,"yyyy-mm"), and convert the source keys the same way in Power Query.
Related functions
- EOMONTH. Produces the period-end date that TEXT turns into a title.
- EDATE. Shifts the date into the fiscal year, so TEXT and MONTH can label it.
- ROUND. Changes the value. TEXT and number formats change only how it reads. Know which one you need.
- TEXTSPLIT. Goes the other way, breaking text apart so it can be converted back to numbers.
- The play the number format carries the unit is the alternative whenever the cell must stay a number.
