TEXT Function
Text
Turn numbers, percentages and dates into formatted text for labels, chart titles and sentences built with formulas.
Updated 12 Oct 2026 Ā· 5 min read Ā· By Sky Dashboards
Cell formatting changes how a value looks without changing the value. That stops helping the moment you join a number to some words: ="Revenue: "&B2 shows the raw 18450, not $18,450. The TEXT function fixes this by applying a number format inside the formula. It is how you build labels, chart titles and sentences that read properly.
In this guide
TEXT syntax
=TEXT(value, format_text)| Argument | Required? | What it does |
|---|---|---|
value |
Required | The number, date or time to format, or a reference to it. |
format_text |
Required | A format code in quotes, such as "$#,##0" or "mmm yyyy". It uses the same codes as custom number formats. |
The result is always text. That is the point of the function, and also its catch, as explained below.
Format codes for numbers and percentages
The codes are the ones you would type under Format Cells > Custom. 0 always shows a digit, even a zero. # shows a digit only when needed. A comma adds thousands separators, and % multiplies by 100 and adds the sign.
| Formula | Result |
|---|---|
=TEXT(1234.567,"0.00") |
1234.57 |
=TEXT(1234.567,"#,##0") |
1,235 |
=TEXT(1234.567,"$#,##0.00") |
$1,234.57 |
=TEXT(0.256,"0%") |
26% |
=TEXT(0.256,"0.0%") |
25.6% |
=TEXT(42,"00000") |
00042 |
=TEXT(0.125,"+0.0%;-0.0%") |
+12.5% |
TEXT rounds to the decimals in the code, just as cell formatting does. The last row has two sections separated by a semicolon, the first for positive numbers and the second for negative, which is handy for growth figures that should always show a sign.
Tip
Leading zeros are a common use. Product codes and invoice numbers stored as numbers lose their zeros, and TEXT(A2,"00000") puts them back as text.
Format codes for dates and times
With 15-Jan-26, a Thursday, in A2:
| Formula | Result |
|---|---|
=TEXT(A2,"dd/mm/yyyy") |
15/01/2026 |
=TEXT(A2,"d mmm yyyy") |
15 Jan 2026 |
=TEXT(A2,"mmm yyyy") |
Jan 2026 |
=TEXT(A2,"mmmm") |
January |
=TEXT(A2,"ddd") |
Thu |
=TEXT(A2,"dddd") |
Thursday |
=TEXT(A2,"yyyy-mm-dd") |
2026-01-15 |
d and dd give the day number, ddd and dddd the weekday name. The m codes give the month, except that m or mm straight after h, or straight before ss, means minutes. For half past six in the evening, "h:mm AM/PM" gives 6:30 PM and "hh:mm" gives 18:30.
Tip
=TEXT(A2,"dddd") is the quickest way to add a weekday column to a booking list or a content calendar.
Dynamic chart titles and labels
This is where TEXT earns its place. A creator's monthly report keeps the numbers in column B and builds readable labels next to them:
| A | B | C | ||
|---|---|---|---|---|
| 1 | Metric | Value | Label | |
| 2 | Revenue | $18,450 | Revenue: $18,450 | |
| 3 | Growth | 12.5% | Growth: +12.5% | |
| 4 | Month | Mar-26 | Report for March 2026 |
C3 uses ="Growth: "&TEXT(B3,"+0.0%;-0.0%") and C4 uses ="Report for "&TEXT(B4,"mmmm yyyy").
Without TEXT, the same formulas would show Revenue: 18450, Growth: 0.125 and Report for 46082, because joining with & uses the stored value, not what the cell displays.
Link a chart title to a cell
- Build the title in a cell, such as the label in C2.
- Click the chart title once to select it.
- Click in the formula bar, type
=, then click cell C2. - Press Enter. The title now follows the cell and updates whenever the data changes.
Note
A chart title can only point to a single cell; it cannot hold a formula of its own, which is why the text is built in a cell first. Text boxes and shapes link to cells the same way, which is how the KPI tiles on a Sky Dashboards template keep their labels in step with the numbers.
The result is text, so you cannot sum it
TEXT returns a string that looks like a number. Excel treats it like any other word:
- SUM ignores it. A total over a column of TEXT results returns 0.
- It aligns left by default, a quick visual clue that a cell holds text.
- Charts cannot use it as values, and sorting puts "10" before "9".
- Lookups miss. An XLOOKUP for the number 42 will not find the text "00042".
| A | B | C | ||
|---|---|---|---|---|
| 1 | Month | Sales | As text | |
| 2 | Jan | $1,200 | $1,200 | |
| 3 | Feb | $950 | $950 | |
| 4 | Mar | $1,480 | $1,480 | |
| 5 | Total | $3,630 | 0 |
Column C holds =TEXT(B2,"$#,##0") filled down. It looks the same as column B, but SUM sees only text and returns 0.
Tip
Keep the number in one cell and the label in another. Do the maths on the number and use the TEXT version only for display.
Locale caveat for date codes
The format code inside TEXT is plain text, so it is read according to the language settings of whoever opens the file. Codes like yyyy and dddd work in English versions of Excel, but some languages use other letters. German Excel, for example, uses J for the year, so TEXT(A2,"mmmm yyyy") may not show the year correctly for a colleague in Germany. Month and day names also come out in the reader's language.
Cell number formatting does not have this problem. Excel stores it in a neutral form and translates it when the file opens on another system.
Note
If a workbook travels between countries, use cell formatting for anything that does not need to be part of a sentence, and test TEXT labels on the other machine. A locale tag at the start of the code, as in "[$-409]mmmm yyyy", forces English month names.
When to use cell formatting instead
TEXT is for building strings. When a value stands on its own in a cell, format the cell and keep the number:
- Totals, KPIs and table values should stay numbers so they can be summed, charted and looked up.
- Dates should stay dates so sorting, filtering and functions like EOMONTH keep working.
-
Leading zeros for display only can come from a custom format such as
00000on the cell, which shows 00042 while storing 42.
āØĀ Open Format Cells
WindowsCtrl + 1
MacCmd + 1
Press Ctrl + 1, choose Custom on the Number tab and type the same code you would give TEXT. The custom number formats guide covers the codes in detail. A good rule: if you are about to wrap a cell in TEXT and nothing else, you probably want cell formatting.
Frequently asked questions
Why can I not add up the results of TEXT?
TEXT always returns text, and SUM skips text. Keep the original number for calculations and use the TEXT result only for labels.
How do I show the day of the week from a date?
Use =TEXT(A2,"dddd") for the full name, such as Thursday, or "ddd" for the short form, Thu.
Can I use TEXT in a chart title?
Not directly. Build the title with TEXT in a cell, then select the chart title, type = in the formula bar and click that cell.
Why does my TEXT date look wrong on another computer?
Format codes inside TEXT follow the language settings of the Excel that opens the file. Use cell formatting where you can, or add a locale tag such as [$-409] to the code.
Want the finished dashboard instead?
My Excel templates come with these formulas already wired up. Pick one, type in your own rows and the charts update.
Browse templates ā