Hello kind people of MrExcel!
I have been searching for this problem a lot in here, but I haven't found yet anything that might help me (or maybe I just can't combine the pieces together).
I have multiple folders that have various files within them. I want to copy a constant range of cells from specific files from each folder, and combine them into columns in a master file. For example:
I have folder JohnA with multiple files, but I only need file JohnWhatever.xls; copy range A1:B4 from Sheet1 of JohnWhatever.xls and paste into Master file A:B column.
Then go into next folder MaryB with multiple files, but only get file MaryWhatever.xls; copy range A1:B4 from Sheet1 of MaryWhatever.xls and paste into Master file A:B column, below the data from the first file.
So on for many many folders. I have the list of folder names/paths as well as file names.
Perhaps it's not relevant to define the folder names/paths, but I don't know if it's possible (or feasible) for the code to go through all the subfolders and look for each of the files that I need.
I thought I'd build a macro to go through each folder with the path specified in a range, and then open the specific workbook based on the name from another range, and copy cells A1:B4 into a column on the master file. Tried to look for this specific solution but can find only partial solutions. As you can imagine, it's not going very well as evidently my "code frankensteining" skills aren't as good as I'd hoped :D
Would be awesome if anyone would be able to help me
I have been searching for this problem a lot in here, but I haven't found yet anything that might help me (or maybe I just can't combine the pieces together).
I have multiple folders that have various files within them. I want to copy a constant range of cells from specific files from each folder, and combine them into columns in a master file. For example:
I have folder JohnA with multiple files, but I only need file JohnWhatever.xls; copy range A1:B4 from Sheet1 of JohnWhatever.xls and paste into Master file A:B column.
Then go into next folder MaryB with multiple files, but only get file MaryWhatever.xls; copy range A1:B4 from Sheet1 of MaryWhatever.xls and paste into Master file A:B column, below the data from the first file.
So on for many many folders. I have the list of folder names/paths as well as file names.
Perhaps it's not relevant to define the folder names/paths, but I don't know if it's possible (or feasible) for the code to go through all the subfolders and look for each of the files that I need.
I thought I'd build a macro to go through each folder with the path specified in a range, and then open the specific workbook based on the name from another range, and copy cells A1:B4 into a column on the master file. Tried to look for this specific solution but can find only partial solutions. As you can imagine, it's not going very well as evidently my "code frankensteining" skills aren't as good as I'd hoped :D
Would be awesome if anyone would be able to help me