Hi Jordan
Firstly, you don't need to go to each location to do the copy. You can just reference it. This is something that took me some time to realise when I was learning VBA, since the Excel macro recorder always does exactly what you tell it (i.e. Activate, Select, Selection., etc.) It came as a real eye opener when I realised! Makes macros run a lot quicker, and you don't move away from where the user is working.
I have added a Function (you'll need to paste it outside your Sub) to test whether the range exists before you use it.
Try this code instead. It assumes you want the pasted list in column A of Temp.:
I haven't been able to test the code without your spreadsheet and the rest of your macro. Let me know if it doesn't work.
An alternate code for cycling through the used range on Strg would be would be to cycle through the cells, rather than cycling through the row numbers:
Let me know if any of this doesn't work, or if you'd like some explanation of how it does.
Cheers, Rob.
Bookmarks