Thanks for your help penagate, i used a modified version of your code and got it working as i wanted.

The note you made about my sequence being backwards doesn't seem to be the case, using your code it ran the 300 line last, meaning the ppm is always 1.10 for anything under 300 miles. Where as backwards it runs the 15 line last which makes it work fine.

thanks, chris1990