Text
TEXT
Definition
TEXT returns a number converted to text in a format you specify.
Syntax
=TEXT(value, format_text)
Arguments
| Argument | Meaning |
|---|---|
value |
The number, or the cell holding it, to convert. |
format_text |
The format, in double quotes, such as "0.00" or "000". |
Worked example
A price list needs two decimal places stored as text. Prices are in B2:B4.
| A: Item | B: Price |
|---|---|
| Mug | 4.5 |
| Bowl | 12 |
| Plate | 0.8 |
Formula: =TEXT(B2,"0.00")
Result: 4.50. The number 4.5 is converted to text with two decimal places.
Practice
Cell A2 holds 7. In B2, write a formula that returns that number as text with at least three digits, padded with zeros.
- In B2, write a TEXT formula that formats A2 as 000.
- B2 should show A2 formatted as 000.
Step 1 of 2
Enter =TEXT(A2,"000") in B2.
A2 is 7, so three digits is 007.
Formulas here use English function names, such as SUM, and a period as the decimal separator, in every language.
Loading the sheet…
B2 uses TEXT.
B2 now shows 007.
Related functions
ROUND can change the numeric value before TEXT converts it. TEXTJOIN can then join that text with other labels.
Common mistake
Adding TEXT results with SUM: the result is text, so SUM skips it unless you convert it back to a number.