In Response To 'Re: Loop function with conditions?'
I think I am too confused at this point to provide a solution.
Perhaps you can look at using Module. That will let you use local variables, change the values of those variables, unlike within a function definition where you cannot change the values of parameters, and include looping. Maybe you can find a way to accomplish what you want with that.