145 result needed would be 55 (next 100 is 200)

23 result needed would be 77 (next 100 is 100)

412 result needed would be 88 (need 100 is 500)

I've got around this by sorting and changing the figure required each time but as the list grows, this is a bit tiresome. Is there a formula that would do this easily?

Thanks