Thanks Kelly,
I had a solution without division or modulo, just counting as I went along. But I thought, "Well, that isn't much math is it?". So I bent myself to the task of calculating some things.
Anyway, if I can make the client only enter
reasonable names then I don't have a problem with him/her, just with the QA department

.
Thanks, Stuart