FIXED function

FIXED(Number, DecimalPlaces?, OmitThousandsSeparators?) FIXED(Number; DecimalPlaces?; OmitThousandsSeparators?)

Number

Number or { Number }

The number to format.

DecimalPlaces

Number or { Number } (optional)

The number of decimal places to use. May be negative, in which case the number is rounded to the left of the decimal point. If omitted, 2 is assumed.

OmitThousandsSeparators

Logical or { Logical } (optional)

FALSE to include thousands separators and TRUE to exclude them. If omitted, FALSE is assumed.

Returns

Text or { Text }

A formatted textual representation of a number.

Returns a number as text with a specified format. This function takes the app's configured language into account. FIXED(42.12)FIXED(42,12) returns "42.12" if the language of the app is set to US English and "42,12" if the language is set to French.

Decimal places

Use the second parameter to set the number of decimal places the returned number is formatted with. FIXED(1234.56789, 3)FIXED(1234,56789; 3) returns "1,234.568" (rounded to three decimal places) if the language is set to US English. FIXED(1234.56789, 3, FALSE)FIXED(1234,56789; 3; FALSE) returns "1234.568", without the thousands separator, because of the third parameter, FALSE.

Rounding to the left of the decimal separator

The second parameter can be set to a negative number, in which case the number is rounded to the left of the decimal separator. FIXED(1234.56789, 0)FIXED(1234,56789; 0) returns "1,235", FIXED(1234.56789, -1)FIXED(1234,56789; -1) returns "1,230", FIXED(1234.56789, -2)FIXED(1234,56789; -2) returns "1,200" and FIXED(1234.56789, -3)FIXED(1234,56789; -3) returns "1,000".

Related functions

Examples

FIXED(42.12)FIXED(42,12)

Returns "42.12" if the language of the app is set to US English and "42,12" if the language is set to French.

FIXED(1234.56789, 3)FIXED(1234,56789; 3)

Returns "1,234.568" if the language is set to US English. The second parameter, 3, specifies that numbers should be formatted with three decimal places.

FIXED(1234.56789, 3, TRUE)FIXED(1234,56789; 3; TRUE)

Returns "1234.568", without the thousands separator, because the third parameter is set to TRUE.

FIXED(1234.56789, -1)FIXED(1234,56789; -1)

Returns "1,230". When the second parameter is set to a negative value, the number is rounded to the left of the decimal separator.

FORMATNUMBER(1234.56789, 3, 3)FORMATNUMBER(1234,56789; 3; 3)

Returns "1,234.568" if the language is set to US English. The second and third parameters are both set to , 3, specifying that the number should be formatted with exactly three decimal places.