I need to round up/down the numbers (last 2 digits, no decimal) based on three conditions:
examples:
..................
假设值在a1中
=IF(MOD(A1,100)=0,A1-1,IF(MOD(A1,100)<51,A1+50-MOD(A1,100),A1+99-MOD(A1,100)))
Try this. (Its quite nice apart from the fudge at the end for the 0 case):
=(CEILING(A1/50,1)*50)-IF(MOD(FLOOR((A1-1)/50,1),2)=1,1,0)
In explanation:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.