OK, you've got numerous problems with your code.
In no particular order:
1. The syntax of your For Next loop is wrong, it's For i=0 to 1000000, not for i=0 to i=100000 - that is a boolean statement which evalutes to 0, so your loop says For i=0 to 0, which is why it only copies the first row.
2. You don't need to manually increment i - that's what the loop does.
3. A for next loop is the wrong tool for the job anyway, you'd be better off manually incrementing i and having the whole lot in a While sum=<budget ... wend loop.
Bookmarks