Macro to have worksheets with unique data become separate workbooks

jasmin1279

New Member
Joined
Apr 26, 2006
Messages
2
My workbook has two workseets that I need to split by an area and then save each new workbook under the areas name. Before anyone says combine the two sheets to make it easier we can't; we have to have 2 separate sheets for this particualr report

Start File:

This is the file that contains all of the data compiled together on two separate worksheets.

Worksheet 1
Fields: Area, Name, Score
Area 31, Joe, 5
Area 31 Jane, 20
Area 33, John, 44
Area 52, Mike, 3

Worksheet 2
Fields: Area, Name, Rating
Area 31, Joe, Fail
Area 31, Jane, Pass
Area 33, John, Pass
Area 52, Mike, Pass

End result of Macro:

Based on sample file the output would be 3 separate files. Each contains both workseets for that particular area. See example below:

Area 31 Results.xls
Worksheet 1
Fields: Area, Name, Score
Area 31, Joe, 5
Area 31 Jane, 20
Worksheet 2
Fields: Area, Name, Rating
Area 31, Joe, Fail
Area 31, Jane, Pass

Area 33 Results.xls
Worksheet 1
Fields: Area, Name, Score
Area 33, John, 44
Worksheet 2
Fields: Area, Name, Rating
Area 33, John, Pass

Area 52 Results.xls
Worksheet 1
Fields: Area, Name, Score
Area 52, Mike, 3
Worksheet 2
Fields: Area, Name, Rating
Area 52, Mike, Pass

I would need both Worksheet 1 and 2 on a new workbook grouped by the areas and called by the area name. Ex "Area 31 Results" then the next would be "Area 33 Results", "Area 52 Results", etc. We would also need this password protected to a password of our liking.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,224,568
Messages
6,179,595
Members
452,927
Latest member
whitfieldcraig

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