TEXT function
Formats a number and converts it to text.
Text
Where can you use it?
Data preparation and reporting teams. Use this group to clean, split or reformat IDs, names and descriptions before using them in reports.
Scenario in the workbook
Display numeric IDs as four-character text with leading zeros.
A worked example from the workbook
| Row | A |
|---|---|
| 6 | Input |
| 7 | 7 |
| 8 | 42 |
| 9 | 314 |
Record 1
=TEXT(A7,"0000")Expected result0007
See the inputs and instructions for all 3 examplesCopyable formulas
English Excel · en-US
=TEXT(A7,"0000")Turkish Excel · tr-TR
=METNEÇEVİR(A7;"0000")Worked examples
Display numeric IDs as four-character text with leading zeros.
Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.
| Row | A |
|---|---|
| 6 | Input |
| 7 | 7 |
| 8 | 42 |
| 9 | 314 |
| Case | Formula | Expected result |
|---|---|---|
| Record 1 | =TEXT(A7,"0000") |
0007 |
| Record 2 | =TEXT(A8,"0000") |
0042 |
| Record 3 | =TEXT(A9,"0000") |
0314 |