Hi,
I have a long complex macro that is acting very strange and was after some advice.
This macro does:
1.) Loops through 3000 or so rows (which will grow).
2.) On each row it needs to filter for a code in another sheet, copy filtered list, paste to a new sheet, sort by earliest date first, filter for date and sum qty, filter remaining dates one by one and sum qty's (phew)
Due to this it needs to delete and recreate a temp sheet for every one of the 3000 rows (i.e. inside a loop). This is taking about 1.5 seconds per row (x 3000 = 1 very long running 30 minute macro).
Is there any way I can speed this up (I already have screenupdating=false and calculation=manual)?
The strange thing is that every so often the macro runs in about 2 minutes. It will run very fast for a few consecutive tries. Then will revert to taking 30 minutes????? Any ideas?
Any help or advice would be much appreciated.
Thanks,
K
I have a long complex macro that is acting very strange and was after some advice.
This macro does:
1.) Loops through 3000 or so rows (which will grow).
2.) On each row it needs to filter for a code in another sheet, copy filtered list, paste to a new sheet, sort by earliest date first, filter for date and sum qty, filter remaining dates one by one and sum qty's (phew)
Due to this it needs to delete and recreate a temp sheet for every one of the 3000 rows (i.e. inside a loop). This is taking about 1.5 seconds per row (x 3000 = 1 very long running 30 minute macro).
Is there any way I can speed this up (I already have screenupdating=false and calculation=manual)?
The strange thing is that every so often the macro runs in about 2 minutes. It will run very fast for a few consecutive tries. Then will revert to taking 30 minutes????? Any ideas?
Any help or advice would be much appreciated.
Thanks,
K