Rather than messing around with deleting rows you'd be better off with:
That should avoid the problem of going over budget.![]()
i=0 While Sum+sheet1.Cells(i+2,3).Value=<Budget And i<10000 sum=sum+sheet1.Cells(i+2,3).Value for cellloop=1 to 3 sheet2.cells(i+2,cellloop).value=sheet1.cells(i+2,cellloop) next cellloop i=i+1 wend
Bookmarks