Show us the code that works to accomplish your task for 3 "iterations" without any macro code involved.
Then we can suggest how to make a macro that accomplishes that.
As a minimum you need to provide an example of your data set and the actual macro call that you used.
... View more