b2==ROUNDUP(A2/10000-$A$1/10000,0)
c2==$C$1+30*ROUND(B2,0)
d2==IF(C2<0,0,IF(C2>200,200,C2))
=IF(A1<50000,MAX(0,100-ROUNDUP((50000-A1)/10000,)*30),100+ROUNDUP((A1-50000)/10000,)*20)