Copy specific worksheets in excel workbooks in a folder into master worksheet

  • For one of my project I need to Copy data from multiple excel workbook in a folder to a master worksheet.

    Earlier the requirement was to just copy the sheet1 from all the files but with the new change I need to copy both sheet 1 and sheet 4 from all the files.

    Headers on all the worksheet is same.


    What I did is Copy the code for Sheet 1 again for Sheet 4 and it worked but it re-opens each excel files twice and paste the data from Sheet 4 after running all the files for sheet 1.


    wanted to check if any one here have suggestion on how to copy data from Sheet 4 right after sheet 1





  • Do both sheets before you close the workbook


  • Try this. I wouldn't use UsedRange though because it can give a false last cell. Look at using CurrentRegion instead.