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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Rijnsent

Well-known Member
Joined
Oct 17, 2005
Messages
1,338
Office Version
  1. 365
Platform
  1. Windows
Hi TriHalo,
could you post the code that you already have, that would help us helping you? (in [CODE][/CODE] brackets please)
Thanks,
Koen
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,010
Messages
5,834,881
Members
430,325
Latest member
Thony

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
Top