Results 1 to 6 of 6

VBA Code that creates new workbook that has 2 sheets and auto save

Threaded View

  1. #1
    Registered User
    Join Date
    12-07-2010
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    4

    VBA Code that creates new workbook that has 2 sheets and auto save

    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:
    Sample.xls
    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

    I have also attached a sample file. On there I would need to keep the headers as is, the drop downs in column F and G with their choices and set the print area around columns A - H on worksheet 1 and columns A - D on worksheet 2 including the data for that area and have it print in landscape. There is more data to these reports - this is just a simplified example
    Attached Files Attached Files
    Last edited by jasmin1279; 12-08-2010 at 10:17 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1