B) Now there is an excel file (“MAIN”) that has info like below – this basically tells which account belongs in which cycle respectively….
Account | Cycle
Ac1 | 10
Ac2 | 10
Ac3 | 11
-------------------------------------------------------------------------------------------------
C) Now in a certain separate folder (C:\RAW\) - there are multiple xls files (specific to accounts) with naming convention such that it has the [account] names included in their filename like this:
Fl_Ac1.xls
fl_Ac2.xls
fl_Ac3.xls
----------------------------------------------------------------------------------------------------
I need VBA to do the following – what macro can I give in the file of step B so that on pressing the button, it loops through the multiple files in folder C:\RAW\ and then looks up the account name in list of sheet A (step B) and then locates the cycle ID, to finally put that file in the respective destination folder in C:\WW\ ---
For example – if the code loops through the file fl_Ac1.xls – it looks up the cycle ID for Ac1 in “MAIN” file and finds that cycle is 10 – then it copies the file – fl_Ac1.xls into the folder C:\WW\2014.09.09 DA 10 XLS folder….