Documentation/Calc Functions/FIXED

Function name:
FIXED

Category:
Text

Summary:
Converts a number to a text representation in a specified format.

Syntax:
FIXED(Number[; Decimals[; No Thousands Separators]])

Returns:
Returns a text string representing the given number in the specified format.

Arguments:
Number is a real number, or a reference to a cell containing a real number, that is to be converted to a text representation.

Decimals is an integer in the range -15 ≤ d ≤ 15, or a reference to a cell containing such an integer, that is the number of decimal places to be used in the text representation. If Decimals is omitted, a default value of 2 is applied. FIXED rounds Number to the specified number of decimal places. If Decimals is negative, Number is rounded to the left of the decimal separator (for example, a Decimals value of -1 rounds to the nearest 10, while a Decimals value of -2 rounds to the nearest 100).

No Thousands Separators is a logical value that controls whether digit group separators are included in the text representation. If set to 0, set to FALSE, or omitted, then digit group separators are included according to locale. If set to any other value, digit group separators are omitted.


 * If any of Number, Decimals, or No Thousands Separators is non-numeric, then FIXED reports a #VALUE! error.
 * If Decimals is a non-integer value, then FIXED converts it to an integer by taking its floor value.
 * If, after taking its floor value, Decimals is less than -15 or greater than 15, then FIXED reports an invalid argument error (Err:502).

Additional details:
The symbol used to separate the integer part of a number from its fractional part is known as a "decimal separator". Various decimal separators are used around the world, dependent on locale. For example, a decimal point (full stop) is used in many countries, a decimal comma is used in many other countries, and an Arabic decimal separator (Unicode character U+066B) is used in the Arab world.

To make reading easier, the digits of longer numbers are often grouped using a delimiter that depends on locale. For example, comma, full stop, and space may be used as the "digit group separator". In many locales, the integer components of numbers are broken up using a delimiter every three digits and this is often known as a "thousands separator". However, in some cases the delimiter is not placed every three digits, and in some cases the fractional component of a number is written using digit group separators. Hence the term "thousands separator" is not universally applicable.

The FIXED function depends on locale settings and therefore should not be regarded as portable.

Examples:
The results of the following formulas are described for the English (USA) locale - results may be different for other locales.

Related LibreOffice functions:
TEXT

ODF standard:
Section 6.20.10, part 2

Equivalent Excel functions:
FIXED