<< Click to Display Table of Contents >> FIXED (format number as text with fixed decimals) |
Syntax:
FIXED(Number [, n] [, NoThousandsSep])
Description:
Converts a number into a text string. The resulting text string is rounded to n decimal places.
Number is the number to be converted.
n (optional) is the number of decimal places. If n is omitted, Number is rounded to two 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 hundred (see last example).
NoThousandsSep (optional) is a logical value that 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:
Please keep in mind 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 round functions (see below) instead.
To display a number rounded without actually rounding it, you can also use the commands from 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: