1. 程式人生 > >在Excel中用函式實現數字“四捨六入五湊偶”

在Excel中用函式實現數字“四捨六入五湊偶”

“四捨六入五湊偶”取整 =IF((A1*10-INT(A1)*10)<=4,INT(A1),IF((A1*10-INT(A1)*10)>=6,INT(A1)+1,INT((INT(A1)+1)/2)*2)) “四捨六入五湊偶”保留一位小數 =IF((A1*100-TRUNC(A1,1)*100)<=4,TRUNC(A1,1),IF((A1*100-TRUNC(A1,1)*100)>=6,TRUNC(A1,1)+0.1,TRUNC((TRUNC(A1,1)+0.1)/2,1)*2))