I'm having problems with the code I've been running in my macro. The problem areas run from " 'Insert Org ID" to " 'Moving columns" (I tried highlighting it red but it didn't work). Essentially, the code pulls data from three text files, adds columns, copies all the data from the last two text files to the first text file, adds and moves columns there, and then moves columns A:H of the final set to the template.
The problem is that when the text files have only one line of data, the commands to copy and FillDown to the End of the Selection end up copying down the ENTIRE worksheet, and then when it goes to copy and paste, it brings up an error saying "Copy area is larger than paste area", and stops the macro.
I have tried multiple times to fix this, but nothing I have done works. I really need this to work whether there is one line of data or 10,000 lines of data, or whatever ends up being the case. Ideas?
Here's my code:
Bookmarks