两位小数:
=IF(C2>(CEILING(C2,0.001)+FLOOR(C2,0.001))/2,CEILING(C2,0.001),IF(C2<(CEILING(C2,0.001)+FLOOR(C2,0.001))/2,FLOOR(C2,0.001),IF(MOD(RIGHT(TRUNC(C2,3),1),2)=0,TRUNC(C2,3),IF(TRUNC(C2,3)=C2,C2,TRUNC(C2,3)+0.001))))
取二位小数时,把公式中的0.001改为0.01,trunc(A1,3)相应改为trunc(A1,2)就可以了。
1位
=IF(MOD(INT(A1*100),10)=5,ROUND(A1/2,1)*2,ROUND(A1,1))
2位
=IF(MOD(INT(A1*1000),10)=5,ROUND(A1/2,2)*2,ROUND(A1,2))
3位
=IF(MOD(INT(A1*10000),10)=5,ROUND(A1/2,3)*2,ROUND(A1,3))
1.16=0.2和0.445003=0.46都不对吧?
我QQ49019650
详谈 需要用find 镶套MOD完成