Hi folks,
I'm trying to build a script for my screenshot sample shown below. The workbook will contain 60+ worksheets listed by account numbers, and the first sheet will contain a list of all account numbers and their assigned region.
When the button is clicked all accounts listed in column A of the Account List worksheet that have matching values in column B, those worksheets are copied to a new workbook, and the new workbook is named after the region name.
So basically:
- Worksheets 3100108 and 3100109 are copied into a new workbook named "WEST".
- Worksheets 3100110, 3100200, and 3100201 are copied into a new workbook named "CENTRAL".
- Worksheets 3300000 and 3301200 are copied into a new workbook named "EAST".
The accounts (worksheet names) in column A can change so it should be based on a range.
I've got a basic VBA script for creating new workbooks based on a list, but no idea how to add in the other elements I'm looking for.
Any help is appreciated!
I'm trying to build a script for my screenshot sample shown below. The workbook will contain 60+ worksheets listed by account numbers, and the first sheet will contain a list of all account numbers and their assigned region.
When the button is clicked all accounts listed in column A of the Account List worksheet that have matching values in column B, those worksheets are copied to a new workbook, and the new workbook is named after the region name.
So basically:
- Worksheets 3100108 and 3100109 are copied into a new workbook named "WEST".
- Worksheets 3100110, 3100200, and 3100201 are copied into a new workbook named "CENTRAL".
- Worksheets 3300000 and 3301200 are copied into a new workbook named "EAST".
The accounts (worksheet names) in column A can change so it should be based on a range.
I've got a basic VBA script for creating new workbooks based on a list, but no idea how to add in the other elements I'm looking for.
Any help is appreciated!