描述
FIXED函数将数字四舍五入为指定的小数位数,使用句点和逗号将数字格式化为十进制格式,然后以文本形式返回输出。
语法
FIXED (number, [decimals], [no_commas])
争论
| Argument | 描述 | Required/Optional |
|---|---|---|
| Number | The number you want to round and convert to text. | Required |
| Decimals | The number of digits to the right of the decimal point. | Optional |
| No_commas |
一个逻辑值
|
Optional |
Notes
-
Microsoft Excel中的数字永远不能有超过15个有效数字,但小数位数最多可以为127。
-
如果小数为负数,则数字会四舍五入到小数点的左侧。
-
如果省略小数,则假定为2。
-
通过使用功能区中的命令格式化包含数字的单元格与直接使用FIXED函数格式化数字之间的主要区别是FIXED将其输出转换为文本。用Cells命令格式化的数字仍然是数字。
-
如果Number或Decimals为非数字,则FIXED返回#VALUE!错误值。
适用性
Excel 2007,Excel 2010,Excel 2013,Excel 2016
Example