To improve a current VBA-Macro in MS Excel that automatically opens workbooks and then transfers data from these multiple workbooks from a single folder to a single Macro-enabled workbook.
Currently, my VBA-Macro can only transfer my source data if these files are stored in the document folder; path as follows C:\\Users\\So\\Documents\\. If the source data files are in any other directory, it does not work. I need it to be flexible in terms of the directory the source data files are kept.
Also, the number of rows copied from source data/files is not dynamic. If the number of rows in which data appears, increases, it still only copies from the pre-determined range.
I have another VBA-Macro that has a dynamic range (automatically includes new rows to be transferred) but does not open the source files automatically and is designed to only copy from one source workbook, not multiple. It's not good enough as I could just copy and paste. It defeats the purpose of having a VBA-Macro.
'PC1' and 'PC2' are source data for 'MTM'. VBA-Macro in 'MTM' opens multiple files. But is not dynamic and 'PC1' and 'PC2' must be in the documents folder for the VBA-Macro to work.
VBA-Macro in 'MTMCONTRACTS' transfers source data from 'Positions-Contracts'. It can transfer from a dynamic range that includes new rows but does not open source data files automatically and only transfers from one opened file. It defeats the purpose of the VBA-Macro.
I just need the one VBA-Macro that combines the attributes of:
1. Opens multiple source data files automatically
2. Source data files can be filed in any directory, not limited to 'Documents' folder
3. Dynamic; includes new rows.
Would prefer the VBA-Macro to be created for the 'MTMCONTRACTS' file. That means also there would be at least one other source data file identical to 'Positions-Contracts' in it's format.
Would be grateful if this VBA-Macro is flexible so that if format/columns change, it will still work.
Many thanks.
About the recuiterMember since Nov 11, 2022 Kunal Garud
from Al Qaḑārif, Sudan