Thanks Mike it's much clearer,
that really helped but it's the syntax in the COMPARE subroutine thats giving me trouble. Is there any chance you could explain what each line in COMPARE is doing? Sorry about asking you to explain what may be simple code but I'm still learning. :-) Hopefully quickly.