NeedHelpOnMacro
New Member
Hello all,
I’m completely new to VBA and have never written one single line of VBA code but I’m convinced that it is the path to go.
I would need your help to import in one consolidated excel file multiple excel files containing each of them multiple workbooks.
In the consolidated file I would need that each copied workbook follows the following naming convention : Filename+WorkbookName where the filename will be truncated after the 12th character.
The path to the different files would be either static and located in cell B2 (and changed manually upon import) or else offer the possibility to browse to the destination folder (as the path will change each time a comparison will be made)
To illustrate. Lets say that under c:\test\ I’ve got 5 excel files named FORM-002062_XXXXXXXXXXXX, FORM-002063_XXXXXXXXXXXX, FORM-002052_XXXXXXXXXXXX, FORM-002562_XXXXXXXXXXXX & FORM-001262_XXXXXXXXXXXX each of them containing different workbooks with different format. The workbook names and numbers are not fixed neither.
for example FORM-002062_XXXXXXXXXXXX contains the following workbooks : Formula, Param, State, Test
In the combined file the copied workbooks would be named as follows : FORM-002062_Formula, FORM-002062_Param, FORM-002062_State & FORM-002062_Test.
Prior copying the workbooks in the consolidated one think it would be worth checking if the workbooks exist. If yes refresh them then do the copy. Then the copied workbook will be copied at the end on the opened excel file. (I’ll be creating around 5 workbooks with parameters and formulas for data verification and the copied workbooks should be copied after those 5 ones)
Another feature would be to list the name of files copied alongside the workbook name. As both files and workbooks would vary from one folder to another.
The naming convention of the copied workbook would be the same for all. Once I get the consolidated file then with formatting/formulas I’ll be able to do most of the data check I would like to do.
MANY THANKS for your help.
Mike
I’m completely new to VBA and have never written one single line of VBA code but I’m convinced that it is the path to go.
I would need your help to import in one consolidated excel file multiple excel files containing each of them multiple workbooks.
In the consolidated file I would need that each copied workbook follows the following naming convention : Filename+WorkbookName where the filename will be truncated after the 12th character.
The path to the different files would be either static and located in cell B2 (and changed manually upon import) or else offer the possibility to browse to the destination folder (as the path will change each time a comparison will be made)
To illustrate. Lets say that under c:\test\ I’ve got 5 excel files named FORM-002062_XXXXXXXXXXXX, FORM-002063_XXXXXXXXXXXX, FORM-002052_XXXXXXXXXXXX, FORM-002562_XXXXXXXXXXXX & FORM-001262_XXXXXXXXXXXX each of them containing different workbooks with different format. The workbook names and numbers are not fixed neither.
for example FORM-002062_XXXXXXXXXXXX contains the following workbooks : Formula, Param, State, Test
In the combined file the copied workbooks would be named as follows : FORM-002062_Formula, FORM-002062_Param, FORM-002062_State & FORM-002062_Test.
Prior copying the workbooks in the consolidated one think it would be worth checking if the workbooks exist. If yes refresh them then do the copy. Then the copied workbook will be copied at the end on the opened excel file. (I’ll be creating around 5 workbooks with parameters and formulas for data verification and the copied workbooks should be copied after those 5 ones)
Another feature would be to list the name of files copied alongside the workbook name. As both files and workbooks would vary from one folder to another.
The naming convention of the copied workbook would be the same for all. Once I get the consolidated file then with formatting/formulas I’ll be able to do most of the data check I would like to do.
MANY THANKS for your help.
Mike