Process Multiple rows and STOP Macro

bmeye4

New Member
Joined
May 14, 2019
Messages
5
I have a macro that will process multiple rows of data. It goes line 2, then line 3, then line 4...etc.. The problem is each row takes 21s to process and I have 65,000 rows. I don't mind letting it run but due to other things I'll need to STOP the macro. I've tried the esc button or controlBreak but it takes about 2 minutes to "catch up" and actually stop. This is working fine.

Is there a way to tell the macro to process 10 or 20 (or however many) rows at a time and then stop and wait for the button to be pressed again to resume?

Also noteworthy: I have it set up so it processes a row and then cuts/pastes said row into a different sheet. Then goes to next available line and does it again.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I think the best thing to do would be to first take a look at your code and see if there is something we can do it to make it more efficient. Many times, there are a few tweaks that can really speed things up, or taking a whole different approach to it that is much more efficient. However, we won't be able to tell that unless we can see your code.

When you do post your code, please use Code Tags so it is formatted nicely and easier to read. See here for directions on how to do that: https://www.mrexcel.com/forum/board-announcements/515787-how-post-your-vba-code.html
 
Upvote 0

Forum statistics

Threads
1,214,835
Messages
6,121,880
Members
449,057
Latest member
Moo4247

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top