描述
BASE函数将数字转换为具有给定基数(基数)的文本表示形式。
语法
BASE (Number, Radix [Min_length])
争论
| Argument | 描述 | Required/Optional |
|---|---|---|
| Number | The number that you want to convert. Must be an integer greater than or equal to 0 and less than 2^53. | Required |
| Radix | The base radix that you want to convert the number into. Must be an integer greater than or equal to 2 and less than or equal to 36. | Required |
| Min_length | The minimum length of the returned string. Must be an integer greater than or equal to 0. | Optional |
Notes
-
作为参数输入的任何非整数都将被截断为整数。
-
Min_length参数的最大值为255。
-
如果包含Min_length参数,则如果输出短于指定的最小长度,则将前导零添加到输出中。
-
如,BASE(16,2)返回10000,而BASE(16,2,8)返回00010000。
-
如果Number,Radix或Min_length超出最小或最大约束,则BASE返回#NUM!错误值。
-
如果Number,Radix或Min_length中的任何一个为非数值,则BASE返回#VALUE!错误值。
适用性
Excel 2013,Excel 2016
Example