Aargh! This one has kept me up up all night!

Basically, I have a folder with around 400 csv files ranging from 100k to 300meg. I want to loop through all of these files, select the data in columns E and F, filter column E for unique values and then extract E&F to a workbook at the last empty row.

I've amended some of the mighty Ron de Bruin's code to accomplish this. Unfortunately, the macro falls over itself after processing the first 20 or so sheets.

It throws the good old "The information cannot be pasted because the copy area and the paste area are not the same shape and size" at this line

Please Login or Register  to view this content.
It's probably something really simple, but I can't work out why it's doing this. All the csv files have the same headers and are the same number of columns. Yet some csvs throw the error, others don't.

Full code is below. I will attempt backflips of gratitude for anyone who can help me!

Please Login or Register  to view this content.