Looks good to me, but for those not too familiar with the formula system, that last comma will cause an error:
switch(r, 1, 100, 2, 75, 3, 63, 4, 55, 5, 50, 6, 45, 7, 40, 8, 35, 9, 30, 10, 25,)
So just remove it:
switch(r, 1, 100, 2, 75, 3, 63, 4, 55, 5, 50, 6, 45, 7, 40, 8, 35, 9, 30, 10, 25)