Please read through Control statements and looping; that should give you some ideas.
HTH,
In reply to Re: any loop ideas? by planetscape in thread any loop ideas? by rse2