TEXT
Converts a value to text in a specific number format.
Syntax
TEXT(value,format_text)
Value is a numeric value, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value.
Format_text is a numeric format as a text string enclosed in quotation marks. You can see various numeric formats by clicking the Number, Date, Time, Currency, or Custom in the Category box of the Number tab in the Format Cells dialog box, and then viewing the formats displayed.
Remarks
- Format_text cannot contain an asterisk (*).
- Formatting a cell by using a command (On the
Hometab, in theNumbergroup, click the arrow next toNumber, and then clickNumber.) changes only the format, not the value. Using the TEXT function converts a value to formatted text, and the result is no longer calculated as a number.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
- Create a blank workbook or worksheet.
- Select the example in the Help topic.
Note Do not select the row or column headers.
Selecting an example from Help
- Press CTRL+C.
- In the worksheet, select cell A1, and press CTRL+V.
- To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Formulastab, in theFormula Auditinggroup, click theShow Formulasbutton.
|
|
See also:
- Calculate the difference between two times
- Combine text and numbers
- Combine text with a date or time
- Convert times
- DOLLAR
- FIXED
- Insert Julian dates
- Show dates as days of the week
- T
- Text functions