VBA help needed for 2-part list

TriHalo

New Member
Joined
Jan 8, 2017
Messages
1
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.

R64veIe.jpg


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!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi TriHalo,
could you post the code that you already have, that would help us helping you? (in [CODE][/CODE] brackets please)
Thanks,
Koen
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top