Related Topics: | ||
Description: Rounds a number to the specified number of decimals, formats the number in decimal format using a period and commas, and returns the result as text.
Syntax: FIXED(Number, [Decimals], [No_commas])
Number is the number you want to round and convert to text.
Decimals is the number of digits to the right of the decimal point.
No_commas is a logical value that, if TRUE, prevents FIXED from including commas in the returned text.
Remarks:
Numbers in the software can never have more than 15 significant digits, but Decimals can be as large as 127 digits. If a number has more than 15 significant digits then the function only considers the first 15 of them.
If Decimals is negative, number is rounded to the left of the decimal point.
If you omit Decimals, it is assumed to be 2.
If No_commas is FALSE or omitted, then the returned text includes commas as usual.
The major difference between formatting a cell containing a number with the Custom Number command (Sheet Options > Format and View > Custom Number) and formatting a number directly with the FIXED function is that FIXED converts its result to text. A number formatted with the Custom Number command is still a number.
Example:
FIXED(1234.567, 1) = 1,234.6 [rounds the first number 1 digit to the right of the decimal point]
FIXED(1234.567, -1) = 1,230 [rounds the first number 1 digit to the left of the decimal point]
FIXED(1234.567, 1, TRUE) = 1234.6 [rounds the first number 1 digit to the right of the decimal point, without commas]
© 1992-2013. ReliaSoft Corporation. ALL RIGHTS RESERVED.