--------------------------------------------------------------------------------
Hello everybody!!
I am struggling with VBA as I have not much experience with it and I hope that one of you might be able to help me
Once a month I receive two separate workbooks (let’s call them workbook 1 and workbook2) which I need to analyse. In both of the workbooks there are about 30 worksheets which are identically drafted. To do my evaluation I created another workbook (let’s call it WorkbookOWN). I was able to create 2 Modules in WorkbookOWN that allow me to get the Data I need from workbook 1 and 2 and plug it together in WorkbookOWN.
However, my code is pretty simple and it works only for Sheets that are named the same in both files (for instance if Sheet 1 in workbook 1 is called USA and if there is a Sheet called USA in WorkbookOWN as well, it works). What I am trying to do is to create a macro that a) will create as many Worksheets in WorkbookOWN as there are in Workbook1 and b) names the Sheets of WorkbookOwn after Workbook1. The name of the Sheet is always in cell “B7” of the respective Worksheet. I guess the tricky part is that in 95 % of the cases, Workbook 1 and Workbook 2 have the same amount of worksheets and are named the same, but sometimes there are 1 or 2 additional Worksheets in Workbook 2.
I attached the file “test” (which is workbook 1) and the file “Excel Macro” (which is WorkbookOWN) to show you what I mean.
I would highly appreciate all kind of help because I tried different things but actually I’m lost!!
Thank you in advance for your help!
Regards,
Ben
Test.xlsxExcel Makro.xlsm
Bookmarks