The TEXT function converts a numeric value to text and lets you specify the display formatting by using special format strings. This function is useful in situations where you want to display numbers in a more readable format, or you want to combine numbers with text or symbols. For example, suppose field "Total" contains the number 23.5. To format the number as a dollar amount, you can use the following formula:

=TEXT([Total],"$0.00")

In this example, GoFormz displays $23.50.

=TEXT([Total],"$0.00") & " per hour"

GoFormz displays $23.50 per hour.

Syntax

TEXT(value, formatString)

The TEXT function syntax has the following arguments:

  • value (Required) A numeric value, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value.
  • formatString (Required) A numeric format as a text string enclosed in quotation marks, for example "m/d/yyyy" or "#,##0.00". See the following sections for specific formatting guidelines.
  • Guidelines for number formats
    • Display decimal places and significant digits To format fractions or numbers that contain decimal points, include the following digit placeholders, decimal points, and thousand separators in the formatString argument.
PlaceholderDescription
0 (zero)Displays insignificant zeros if a number has fewer digits than there are zeros in the format. For example, if you type 8.9, and you want it to be displayed as 8.90, use the format #.00.
#Follows the same rules as the 0 (zero). However, GoFormz does not display extra zeros when the number that you type has fewer digits on either side of the decimal than there are # symbols in the format. For example, if the custom format is #.##, and you type 8.9 in the cell, the number 8.9 is displayed.
. (period)Displays the decimal point in a number.
  • If a number has more digits to the right of the decimal point than there are placeholders in the format, the number rounds to as many decimal places as there are placeholders. If there are more digits to the left of the decimal point than there are placeholders, the extra digits are displayed. If the format contains only number signs (#) to the left of the decimal point, numbers less than 1 begin with a decimal point; for example, .47
To displayAsUse this format
1234.591234.5####.#
8.98.900#.000
0.6310.60.#
12
1234.568
12.0
1234.56
#.0#
  • Display a thousands separator: To display a comma as a thousands separator or to scale a number by a multiple of 1,000, include the following separator in the number format.
PlaceholderDescription
, (comma)Displays the thousands separator in a number. GoFormz separates thousands by commas if the format contains a comma that is enclosed by number signs (#) or by zeros. A comma that follows a digit placeholder scales the number by 1,000. For example, if the format_text argument is "#,###.0,", GoFormz displays the number 12200 as 12,200.0.
To displayAsUse this format
1200012,000#,###
1200012,000.00#,###.00
mDisplays the month as a number without a leading zero.
mmDisplays the month as a number with a leading zero when appropriate.
mmmDisplays the month as an abbreviation (Jan to Dec).
mmmmDisplays the month as a full name (January to December).
mmmmmDisplays the month as a single letter (J to D).
dDisplays the day as a number without a leading zero.
ddDisplays the day as a number with a leading zero when appropriate.
dddDisplays the day as an abbreviation (Sun to Sat).
ddddDisplays the day as a full name (Sunday to Saturday).
yyDisplays the year as a two-digit number.
yyyyDisplays the year as a four-digit number.
To displayAsUse this format
Months1-12m
Months01-12mm
MonthsJan-Decmmm
MonthsJanuary-Decembermmmm
MonthsJ-Dmmmmm
Days1-31d
Days01-31dd
DaysSun-Satddd
DaysSunday-Saturdaydddd
Years00-99yy
Years1900-1999yyyy
hDisplays the hour as a number without a leading zero.
[h]Displays elapsed time in hours. If you are working with a formula that returns a time in which the number of hours exceeds 24, use a number format that resembles [h]:mm:ss.
hhDisplays the hour as a number with a leading zero when appropriate. If the format contains AM or PM, the hour is shown based on the 12-hour clock. Otherwise, the hour is shown based on the 24-hour clock.
mDisplays the minute as a number without a leading zero.

NOTE: The m or the mm code must appear immediately after the h or hh code or immediately before the ss code; otherwise, GoFormz displays the month instead of minutes.
[m]Displays elapsed time in minutes. If you are working with a formula that returns a time in which the number of minutes exceeds 60, use a number format that resembles [mm]:ss.
mmDisplays the minute as a number with a leading zero when appropriate.

NOTE: The m or the mm code must appear immediately after the h or hh code or immediately before the ss code; otherwise, Excel displays the month instead of minutes.
sDisplays the second as a number without a leading zero.
[s]Displays elapsed time in seconds. If you are working with a formula that returns a time in which the number of seconds exceeds 60, use a number format that resembles [ss].
ssDisplays the second as a number with a leading zero when appropriate. If you want to display fractions of a second, use a number format that resembles h:mm:ss.00.
AM/PM
am/pm
A/P
a/p
Displays the hour based on a 12-hour clock. Excel displays AM, am, A, or a for times from midnight until noon and PM, pm, P, or p for times from noon until midnight.
To displayAsUse this format
Hours0-23h
Hours00-23hh
Minutes0-59m
Minutes00-59mm
Seconds0-59s
Seconds00-59ss
Time4 AMh AM/PM
Time4:36 AMh:mm AM/PM
Time4:36:03 Ph:mm:ss A/P
Time4:36:03.75h:mm:ss.00
Elapsed time (hours and minutes)1:02[h]:mm
Elapsed time (minutes and seconds)62:16[mm]:ss
Elapsed time (seconds and hundredths)3735.80[ss].00