Hi
I’m looking for help with a macro that splits a Master data workbook into multiple workbooks. The Master data workbook has two sheets:
The macro should do the following:
I’m looking for help with a macro that splits a Master data workbook into multiple workbooks. The Master data workbook has two sheets:
- Client data (first screenshot) – each row contains different client details, going to thousands of clients.
- Accounts data (second screenshot)– there are multiple rows for one client.
The macro should do the following:
- Create a new workbook
- Rename first sheet as ‘first client ID & client data’ in this case it will be ‘2 client data’.
- From the Master data workbook, client data sheet, copy and paste the row with respective client data retaining the header.
- Add a new sheet and rename it as first client ID & account data. In this case it will be ‘2 account data’.
- From the Master data workbook, account data sheet, copy and paste all the rows with that respective client ID.
- Repeat steps 2 to 5 for the other client IDS upto a max of 10 clients.
- The sheets in this workbook should look as below
- Save this workbook down as ‘Data 1’ in the same folder as the Master data workbook.
- Create a new workbook and repeat the above steps for the next 10 client IDS and then save as ‘Data 2’.
- Repeat until all data in the Master data workbook is copied.