I assume that the macro is quickly jumping back and forth between sheets, before returning me to my first sheet. Is there a way to prevent that from happening?
Yes, with Application.ScreenUpdating, shown in code below. However, the way I wrote the code, it won't be of too much help here.
Anyway, a few things.
- You don't ever really to do .Select. This is a human activity, and in VBA you can just work with the ranges directly. I've shown that in the code.
- When copying just values, w/o formatting, it is my personal preference to just set the ranges equal to each other. I find it more straightforward.
The following is the functional equivalent of the second code set you posted. It is shorter, and IMHO, clearer.
Bookmarks