I'm trying to calculate amounts of units in tiers. So the tiers are:
T1 0-299
T2 300-349
T3 350-550
T4 551-650
T5 651 -
so if I put in 250, it should show 250 in the first tier. If I entered 600, it would show 299 in first tier, 50 in second tier, 201 in the 3rd and 50 in...