Reputation: 50
I need to round up/down the numbers (last 2 digits, no decimal) based on three conditions:
examples:
..................
Upvotes: 0
Views: 3189
Reputation: 41539
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:
Upvotes: 1
Reputation: 3096
assume value is in a1
=IF(MOD(A1,100)=0,A1-1,IF(MOD(A1,100)<51,A1+50-MOD(A1,100),A1+99-MOD(A1,100)))
Upvotes: 3