I stand to be corrected here by excel minds much greater than mine, which is not hard.
If you fully qualify your code with something like the code below, you should have a lot less or no problems with the results going west.
There are other ways of doing the qualifying, but I find this way more readable, especially when coming back to it after a period of time.
I once spent ages formatting a sheet only for me to destroy it in a blink of an eye when I had things go wrong in a big way. Qualifying
my code sorted that out. By using a variable name for a worksheet in your code you can give than sheet any tab name you like & change it at will & it won't affect the macro. If you treat excel as if it's as thick as 2 short planks & has to be told exactly what to do, you
shouldn't go wrong.
Bookmarks