+ Reply to Thread
Results 1 to 5 of 5

Create new sheets based on template from master sheet data/information?

  1. #1
    Registered User
    Join Date
    06-28-2012
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    3

    Create new sheets based on template from master sheet data/information?

    I have a master spreadsheet with all my project info on it. I would like to be able to create a new sheets from each project name but based on a separate template sheet that I have created. Each new project sheet would be populated with master spreadsheet information/data and also calculations run on the template. I hope I have attached my file correctly.
    XYZ Project Status.xlsx

  2. #2
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Create new sheets based on template from master sheet data/information?

    'FILL OUT A TEMPLATE FROM A DATABASE
    I have a macro for taking the data from a database sheet and filling out a template sheet over and over again with the data.


    The macro fills out the template and saves each one as a separate file OR creates a separate sheet, your choice. That last part can be tweaked to do other things, this is mainly to demonstrate a simple way to fill out a form from a row-based database.


    THe code you will need to edit or expand on is highlighted in red to make it obvious. For instance, change the Sheets("Data") to Sheets("MASTER") for your project. And down in the "fill out the form" section, you'll need to just add more lines to transfer values from each column of your master to the constant positions in your new sheets.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    06-28-2012
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Create new sheets based on template from master sheet data/information?

    Thanks Jerry. This is great. I have it working just fine with the excpetion that when I have run it once it works fine but I save it, add another entry and re-run it all the previously created individual sheet macros are there and it attempts to recreate them.

    What code do I need to add to be able to add new entry rows in the Master (your "Data" sheet) later and rerun either the whole thing or create just the new sheets from the template.

    Thanks.

  4. #4
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Create new sheets based on template from master sheet data/information?

    Hmm, I guess you would need to add a new column to your data. In that column you can flag each row as "exported". So when the macro is running, it would skip any rows that have any value in that column. Also, when it DOES run, it would need to add "processed" into that column.

    Let's use column N.

    So the whole "looping" section would need to check column N before it did anything, something like:

    Please Login or Register  to view this content.

  5. #5
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Create new sheets based on template from master sheet data/information?

    How'd that go? All done?

    If that takes care of your need, please select Thread Tools from menu above and set this topic to SOLVED.

+ 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