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!
 

Some videos you may like

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Rijnsent

Well-known Member
Joined
Oct 17, 2005
Messages
1,300
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,964
Messages
5,599,071
Members
414,281
Latest member
Engjamal2021

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