我有以下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数字,每次用户向电子表格中输入新数据时都可以更改这些数字。
在列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,等等。
是否有一种方法可以根据上面描述的系统自动进行舍入?
发布于 2017-07-05 11:05:12
将B1中的下列公式向下放置:
=ROUNDDOWN(A1,-(INT(LOG10(A1)/2)+2))https://stackoverflow.com/questions/44922922
复制相似问题