FIXED (format number as text with fixed decimals)

<< Click to Display Table of Contents >>

FIXED (format number as text with fixed decimals)

Syntax:

FIXED(Number [, n] [, NoThousandsSep])

Description:

This converts a number into a text string. The resulting text string contains the number rounded to n decimal places with thousands separators.

Number is the number to be converted.

n (optional) is the desired number of decimal places. If n is omitted, Number is rounded to 2 decimal places.

If n is a negative value, Number is rounded to the left of the decimal point. For example, if n is -2, Number is rounded to the nearest multiple of a hundred (see last example).

The optional logical value NoThousandsSep lets you specify if the resulting text string should contain thousands separators:

FALSE or omitted: Add thousands separators

TRUE: Do not add thousands separators

Note:

Note that the result of this function is a text string. To round a number without converting it to a text string, use one of the rounding functions (see below).

To only display a number as rounded without actually rounding it, you can also use the commands of the ribbon tab Home | group Number.

Example:

FIXED(1234.5678, 2) returns the text string 1,234.57

FIXED(1234.5678, 2, TRUE) returns the text string 1234.57 (without thousands separators)

FIXED(1234.5678, -2) returns the text string 1,200

See also:

ROUND, ROUNDDOWN, ROUNDUP, TRUNC, TEXT, INT