The TEXT function: day names, leading zeros and £ in a sentence
TEXT shows a number or a date the way you choose, as text: =TEXT(A2,"dddd") turns the date in A2 into its day of the week, such as Saturday. It works in every version of Excel, on Windows and Mac and in Excel for the web. The part in quotes is a format code: "00000" shows 742 as 00742, and "£#,##0.00" shows 1234.5 as £1,234.50, ready to join into a sentence.
The format codes at a glance
| You want | Formula | Shows |
|---|---|---|
| The day of the week | =TEXT(A2,"dddd") | Saturday (or Sat with "ddd") |
| The month's name | =TEXT(A2,"mmmm") | March (or Mar with "mmm") |
| A date in a sentence | ="Due "&TEXT(A2,"d mmmm yyyy") | Due 14 March 2026 |
| A UK date as text | =TEXT(A2,"dd/mm/yyyy") | 14/03/2026 |
| Leading zeros | =TEXT(B2,"00000") | 00742 |
| Money in a sentence | ="Total: "&TEXT(B2,"£#,##0.00") | Total: £1,234.50 |
| A percentage in a sentence | ="Up "&TEXT(C2,"0%") | Up 15% |
TEXT always gives text. If you only want a cell to look different and still add up, use a number format instead (see "TEXT gives text" below).
The day of the week from a date
A rota has a list of dates, and you want the day name next to each. By hand, you'd look each one up on a calendar: 14 March 2026 is a Saturday. TEXT does the looking up for you.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Date | Day | Short | Month |
| 2 | 14/03/2026 | Saturday | Sat | March |
| 3 | 16/03/2026 | Monday | Mon | March |
| 4 | 02/04/2026 | Thursday | Thu | April |
=TEXT(A2,"dddd")
A2is the date."dddd"is the format code, in quotes: four d's for the whole day name.
The codes for dates:
| Code | 14/03/2026 shows as |
|---|---|
"d" | 14 |
"dddd" | Saturday |
"ddd" | Sat |
"mmmm" | March |
"mmm yyyy" | Mar 2026 |
"d mmmm yyyy" | 14 March 2026 |
"dd/mm/yyyy" | 14/03/2026 |
One d gives the day of the month, two give it with a leading zero (03), three give the short day name and four the full one. The m's work the same way for months. If you need the day as a number instead, for sums or sorting, =WEEKDAY(A2,2) gives 1 for Monday up to 7 for Sunday.
Leading zeros
Staff numbers, account codes and school IDs often have a fixed length, such as 5 digits. Excel drops the zeros at the front of a number, so 00742 becomes 742. =TEXT(B2,"00000") shows it with 5 digits again: each 0 in the code is a digit that's always shown, so a short number is padded with zeros at the front.
| A | B | C | |
|---|---|---|---|
| 1 | Name | Staff no. | 5 digits |
| 2 | Ruth | 742 | 00742 |
| 3 | Dan | 10385 | 10385 |
| 4 | Mia | 61 | 00061 |
UK phone numbers lose their 0 in the same way: 07700900123 typed into a cell with no space becomes 7700900123. =TEXT(B2,"00000 000000") puts the 0 back and the space after the fifth digit, giving 07700 900123. For phone numbers you type in yourself, format the column as Text first so Excel keeps them as typed.
Dates in a sentence
Underneath, a date is a count of days. Join one onto some words and you see the count: =A2&" starts on "&B2 gives Grace starts on 46095. TEXT turns the date back into words first.
=A2&" starts on "&TEXT(B2,"d mmmm yyyy")
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Name | Start date | Without TEXT | With TEXT |
| 2 | Grace | 14/03/2026 | Grace starts on 46095 | Grace starts on 14 March 2026 |
| 3 | Tom | 01/04/2026 | Tom starts on 46113 | Tom starts on 1 April 2026 |
| 4 | Priya | 27/04/2026 | Priya starts on 46139 | Priya starts on 27 April 2026 |
Write the codes in UK order, day then month then year: "dd/mm/yyyy". With "mm/dd/yyyy", 1 April shows as 04/01/2026, which a UK reader takes as 4 January. There's more on joining in joining text.
Money and percentages in a sentence
Joining a number onto some words loses its formatting too: ="Total: "&B2 shows Total: 1234.5. TEXT puts the £ sign, the comma and the pennies back:
="Total: "&TEXT(B2,"£#,##0.00")
In the code, #,##0 means "use a comma for thousands" and .00 means "always two decimal places". Use "£#,##0" for whole pounds. A percentage works the same way: 0.153 with "0%" shows as 15%, and with "0.0%" as 15.3%.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Region | Sales | Change | Summary |
| 2 | North | £1,234.50 | 15.3% | North: £1,235, change +15% |
| 3 | South | £18,250.00 | -5% | South: £18,250, change -5% |
| 4 | East | £960.75 | 20% | East: £961, change +20% |
The code "+0%;-0%" has two parts split by a semicolon: the first is for 0 and above, and the second for numbers below 0. That's how North shows +15% and South shows -5%. With "0%" on its own, a rise would show with no + sign.
TEXT gives text, so you can't add it up
The result of TEXT looks like a number but it's text. Add up a column of TEXT results with SUM and you get 0, and they line up on the left of the cell.
| A | B | C | |
|---|---|---|---|
| 1 | Item | Amount | With TEXT |
| 2 | Paper | £125.50 | £125.50 |
| 3 | Ink | £80.00 | £80.00 |
| 4 | Labels | £42.25 | £42.25 |
| 5 | Total | £247.75 | 0 |
- Keep the real number in its own column and use TEXT only for what's shown or joined into a sentence.
- If you only want a cell to look different, use a number format instead: open Format Cells with Ctrl+1 on Windows or Cmd+1 on a Mac, choose Custom, and type the same code, such as 00000. The cell still holds the number, so it still adds up.
- If you've been sent TEXT results and need the numbers back,
=VALUE(C2)turns them into numbers again. Numbers stored as text has the other ways.
Common mistakes
The code without quotes
=TEXT(A2,dddd) gives #NAME?, because Excel reads dddd as a name it doesn't know. The format code always goes in double quotes (see the #NAME? error).
The date is really text
If A2 holds a date typed as text, such as 14.03.2026 with dots, TEXT can't read it and shows it unchanged. Retype it as 14/03/2026, or see the numbers and dates stored as text lesson.
mm in a time
Next to an h, mm means minutes: =TEXT(A2,"hh:mm") shows 07:30. Everywhere else it means the month. For a date and time together, "dd/mm/yyyy hh:mm" gets both right.
Different codes in other languages
The codes follow your computer's language settings. On a UK or US setup, d, m and y are right. On a computer set to another language, Excel may expect that language's letters. Check the format codes in your own Excel if the result looks wrong.
Try it now
In B2, show the day of the week for the delivery date in A2, written in full, such as Monday. Your formula will be copied down to B7.
| A | B | |
|---|---|---|
| 1 | Delivery date | Day |
| 2 | 02/03/2026 | |
| 3 | 05/03/2026 | |
| 4 | 07/03/2026 | |
| 5 | 10/03/2026 | |
| 6 | 13/03/2026 | |
| 7 | 15/03/2026 |
Open this in Try a formula: the same sheet with the answer filled in, to change or share by link.
Part of Excel data cleaning practice: every lesson on the topic, with a project in Excel.
Where it works
TEXT works in every version of Excel on Windows and Mac, and in Excel for the web. Google Sheets has a TEXT function too.
Questions
How do I get the day of the week from a date in Excel?
Use =TEXT(A2,"dddd") for the full name, such as Saturday, or =TEXT(A2,"ddd") for Sat. The result is text, so it can't be sorted Monday to Sunday. For a number you can sort or add up, use =WEEKDAY(A2,2), which gives 1 for Monday up to 7 for Sunday. To show the day name in the date cell itself, give it the custom number format dddd.
How do I keep leading zeros in Excel?
For codes you type in, such as phone numbers, format the cells as Text before you type and Excel keeps every 0. For numbers already in a column, =TEXT(B2,"00000") shows 742 as 00742, as text. To keep a real number that only looks like 00742, use Format Cells, Custom, and type 00000 as the format code.
Why does a date turn into a number when I join it to text?
Excel stores a date as a count of days since 1900, so 14 March 2026 is 46095 underneath. The date format is only how the cell looks, and joining with & uses the number itself. Wrap the date in TEXT to choose how it looks in the sentence: ="Due "&TEXT(A2,"dd/mm/yyyy") gives Due 14/03/2026.
Can I add up the results of the TEXT function?
No. TEXT always gives text, even when the result looks like a number, so SUM skips it and the total comes out as 0. Keep the real numbers in their own column and add those up. If you only want the cells to look different, use a custom number format in Format Cells, which changes the look and keeps the numbers.