I have a folder with ~20 workbooks that all have different file names and I need to pull off a specific worksheet from each workbook into 1 main workbook. I'm not familiar in VBA but I was hoping someone can turn my pseudocode into a working VBA script for Excel.
create wrkbk_names as array
store workbook names in "folder" to wrkbk_names
for each book in wrkbk_names
for each worksheet in book
if worksheet.name = "targetSheet"
copy worksheet("targetSheet") to Mainbook.xlxs
The workbooks are extremely large with 50+ sheets/book so if I could open them without activation that would speed up the process quite a lot. The specific worksheet I'm trying to extract has the same name across all workbooks although I'm not too sure about the index.
Bonus points would be if the script can copy the cells from the worksheet to the next empty row of Mainbook so that all of the targetSheet data from 20 workbooks are compiled to 1 worksheet of Mainbook.