Excel 基于数字位数的舍入
我有以下Excel电子表格:Excel 基于数字位数的舍入,excel,Excel,我有以下Excel电子表格: A B 1 6.355 6.000 2 58.690 50.000 3 357.867 350.000 4 1.260.563 1.200.000 5 12.480.370 12.400.000 在A列中,我有一组radnom数字,每当用户在电子表格中输
A B
1 6.355 6.000
2 58.690 50.000
3 357.867 350.000
4 1.260.563 1.200.000
5 12.480.370 12.400.000
在A列中,我有一组radnom数字,每当用户在电子表格中输入新数据时,这些数字都会发生变化
在B列中,我想对A列中的数字进行削减和四舍五入,如下所示:
Number consists of 4 digits --> CUT and ROUNDDOWN after the 1st digit
Number consitst of 5 digits --> CUT and ROUNDDOWN after the 1st digit
Number consists of 6 digits --> CUT and ROUNDDOWN after the 2nd digit
Number consists of 7 digits --> CUT and ROUNDDOWN after the 2nd digit
Number consists of 8 digits --> CUT and ROUNDDOWN after the 3rd digit
到目前为止,我尝试了以下方法:
=ROUNDDOWN(A1,1-LEN(A1))
然而,该公式仅适用于4-5位数字。之后,我必须将1更改为2,以此类推
是否有一种方法可以根据上述系统自动进行舍入?将以下公式向下放入
B1
:
=ROUNDDOWN(A1,-(INT(LOG10(A1)/2)+2))
将以下公式向下放入
B1
:
=ROUNDDOWN(A1,-(INT(LOG10(A1)/2)+2))