Hi,

I am been given a list of numbers in a certain format [19700, 19900, 79400, 79600, 79800, 179300, 179500, 279799 etc]. There is no maximum value on this list.

I need to scale back these numbers so that they don't exceed the number 5100 but I need to preserve the proportion of the numbers i.e. 179500 is higher than 79600 which is higher than 79400 etc etc.

I thought I could do this with mod 5100 but in hindsight that doesn't work...

Any suggestions would be greatly appreciated about how I should approach this.