Can you give us a sample data set? Trying to set one up to step through your code is tedious. Also, if you could explain what you are trying to accomplish (if the data set doesn't make that obvious) that would help a lot too.
But just for starters, something like this is processor intensive:
You're essentially updating a value in a cell every time through the loop (and I have no idea how many rows/i's you have). Instead, you could just do your incrementation, then put the final value in a cell:
If you've got thousands and thousands of rows, that would help.
Anyway, I suspect you're doing some unnecessary looping that is taking a lot of time. Can tell you more with a data set.
Bookmarks