TEXT

Description

TEXT returns the given number as text, using the specified formatting.

Syntax

TEXT ( number, format )

 

Parameter

Description

number

Any value, a formula that evaluates to a number, or a reference to a cell that contains a value.

format

A string representing a number format. The string can be any valid format string including General, M/DD/YY, or H:MM AM/PM. The format must be surrounded by a set of double quotation marks. Asterisks cannot be included in format.

Examples

This function returns 123.620:

TEXT(123.62, "0.000")

This function returns 10/19/94:

TEXT(34626.2, "MM/DD/YY")

 Note:

If an Invalid formula syntax warning appears, check whether the comma is set as the list separator in your regional settings on the Windows Control Panel. If a different character is set as the list separator, use this character in the above examples in place of the comma. (Windows XP: Access the Windows Control Panel and select Regional and Language Options. On the Regional Options tab page, click Customize. On the Numbers tab page, check which character is the default list separator on your computer. Use this character in the above examples instead of the comma.

Also, see

FIXED

T

VALUE