TEXT (number, format)
Parameter |
Description |
number |
number you want to format; can be a numerical value or cell reference (if a text string is used, no formatting will be applied) |
format |
type of formatting to be applied to the number; must be enclosed in double quotes |
Users experienced in entering formulas may prefer to use the TEXT function. To use this function:
Click on the cell you want the insert the fixed value into.
Type in a formula. For example, for $25.00, type =TEXT(25, "$0.00").
To see a full list of possible formats, go to the Format menu, and select Number Formatting. In the Format Cells window, the list of formats is given in the Type box. Common formats include:
Category |
Format |
Sample |
Currency |
$ 0.00 |
$ 6500.00 |
$ #,##0 |
$ 6,500 | |
$ #,##0.00 |
$ 6,500.00 | |
Fixed |
#.00 |
6500.00 |
#,##0 |
6,500 | |
#,##0.00 |
6,500.00 | |
Percent |
0% |
25% |
#.00% |
25.00% | |
Fraction |
?/? |
1/4 |
??/?? |
23/25 | |
Scientific |
0.00E+00 |
1.50E+02 |
##0.0E+0 |
800.0E+9 | |
Date |
m/d/yy |
12/30/1988 |
d-mmm |
2-Jan | |
mmm-yy |
Oct-98 | |
mmmm d, yyyy |
January 1, 2002 | |
Time |
h:mm AM/PM |
12:00 AM |
Press Enter. The result of your formula will appear in the cell. Note that the number can be used in basic calculations (addition, multiplication, subtraction, division); however, it will not be included in totals and subtotals.
Examples:
Formula |
Result |
=TEXT(5, "$ 0.00") |
$ 5.00 |
=TEXT(5.6, "0") |
6 |
=TEXT(2500, "#,###") |
2,500 |
=TEXT(0.75, "0%") |
75% |
=TEXT(0.75, "?/?") |
3/4 |
=TEXT(1, "mmm-yy") |
Jan-01 |
See Also: