+ Reply to Thread
Results 1 to 5 of 5

Macro to create new workbooks from master workbook

  1. #1
    Registered User
    Join Date
    10-24-2008
    Location
    Salt Lake
    Posts
    2

    Macro to create new workbooks from master workbook

    I need some help with the VBA code to take a master spreadsheet which has 3000 lines of data (3000 employees), and break that data out onto different workbooks, not different sheets in the same workbook.

    The criteria is based upon branch number which is in column A. So basically I want to create a new workbook for all of the employees in the master spreadsheet based upon the branch number located in column A. Some branches might have 10 employees, some might have 2. The master spreadsheet has various columns A though G all of which would need to be copied onto its on workbook. So how would I code the macro to do this? The new workbook name would just be the branch number. Could someone help me with this? I would really appreciate it.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202
    Do yo really need to separate this data, why not just filter by branch number or maube use a PivotTable/
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    10-24-2008
    Location
    Salt Lake
    Posts
    2
    Yes, I need this data seperated because I have to then email each individual workbook to a different manager. Can someone help me code this macro to do this. I already have an email macro which will take each individual sheet and email it, but I need the macro to break out the master sheet onto each individual workbook.

  4. #4
    Forum Contributor
    Join Date
    02-14-2007
    Location
    Chester, England
    MS-Off Ver
    2010 & 2016
    Posts
    312
    Hi There

    I have a macro that will create a new spreadsheet each time the line manager's name changes. (there is no sort in the macro so that will need to be added if it is not already sorted)

    I have a attached an example spreadsheet.

    you will need to create another sheet called template which contains just the headings.

    Not being very good at VBA I have just coblled this together to do what I want so probably cant help you too much more but this should be a good starting place for you.

    Regards

    Jim
    Attached Files Attached Files

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202
    Try this

    Please Login or Register  to view this content.
    Last edited by royUK; 10-30-2008 at 07:33 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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