Hi everyone,
I have an existing macro which works pretty well. I currently run through all workbooks in a folder, identifies worksheet names which match worksheet names in the master workbook and copies the data from the external workbook worksheet to the master workbook worksheet. What I'm trying to do is adjust the macro to do the following:
1. run through each workbook in a folder
2. if the workbook name equals a cell value in ThisWorkbook.Sheet1.range("B2:B50") then copy Worksheet("ABC") entire used range into Workbooks(2) with the worksheet that matches the external workbook name.
3. move to the next cell in the range and repeat as above
So for example, lets cell B2 in ThisWorkbook.Sheet1.range("B2:B50") = "Stuff"
The macro will find workbook.name = "Stuff" and copy the used range in Workbooks("Stuff").Worksheets("ABC")
The master will paste this used range into Workbooks(2).Worksheets("Stuff")
Then move onto the cell B3 in ThisWorkBook.Sheet1.range("B2:B50")
Below is the macro as I have it. It doesn't work with the adjustments I've tried to make:
Any ideas?
Thanks!!
Bookmarks