You and SerPounce certainly have it covered, but based on what you have described, I would have a second field in the data type, and I would write the number to both fields but change the number to 10 in the second field for any values greater than 10. Then, just use the second field to do your calculations and eliminate all the on the fly stuff.
Anyway, just food for thought on another way to go about it.
Best…
Mike