Thanks Lifepower

Unfortunately I have since discovered that that whole routine I was converting seems to give incorrect values anyway!

I have found that this:

Code:
Result := Round(n / s + 0.4) * s
Seems to give me accurate results

cheers,
Paul