Qweeg #1 Brill! Thanks Scott - think you hit the nail on the head. I was using floating points and rejigging the code to use integers instead seems to have done the trick