+ Reply to Thread
Results 1 to 4 of 4

Create n amount of new sheets based off a template

  1. #1
    Registered User
    Join Date
    08-15-2011
    Location
    Puerto Rico
    MS-Off Ver
    Excel 2007
    Posts
    4

    Create n amount of new sheets based off a template

    Hi, I'm a beginner with macros and was hoping someone could help me prepare one

    I'm preparing a workbook to help project managers estimate project costs and revenues. I have an input sheet ("Start") in which they would enter some basic info about the project. In cells G55:J79 of that sheet, there is a table that the managers can use to enter info about project deliverables. The table looks like this:

    Name | Start Date | End Date | Price
    Requirement Analysis | 8/16/2011 | 9/16/2011 | $75,000
    System Implementation | 9/16/2011 | 10/16/2011 | $100,000

    I prepared a separate worksheet that I want to use as a template to look at the specific costs and revenues of each deliverable. This sheet is called "DelDetail". What I'm hoping to make is a command box that creates (and names according to the deliverable's name) a new "DelDetail" worksheet for each deliverable on the table above.

    Additionally, the "DelDetail" worksheet has cells for a Start Date, End Date and Price (C7, C8 and C10, respectively). I would like those cells to be filled by the info in the "Start" sheet when the manager runs the macro.

    So for example, if the info on the above table is entered in the Start sheet, I want the macro to create two new "DelDetail" sheets named "Requirement Analysis" and "System Implementation". Cell C7 of those new sheets should contain the Start Date, C8 would have the End Date and the price would be on cell C10.

    I wanted to prepare a macro made up of two parts - a loop to to see if a see if a sheet already exists for the deliverable, and a function to create the sheet if it does not exist. However, I don't understand the For Next Loop very well yet, and I could not do it.

    Any help would be greatly appreciated. If any additional info is needed, let me know...I tried to put as much as I could in the post.

    Thanks!
    Last edited by pgomez03; 08-17-2011 at 01:38 PM.

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Create n amount of new sheets based of a template

    Shouldn't be too tough, but I'd rather not start from scratch. Can you post a sample workbook?
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Registered User
    Join Date
    08-15-2011
    Location
    Puerto Rico
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Create n amount of new sheets based of a template

    Of course...

    In the file you'll see my failed attempt at making the macro. Thanks your your help.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-15-2011
    Location
    Puerto Rico
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Create n amount of new sheets based of a template

    I was able to fix it myself. Learned to properly use For Next loops...

    Thanks anyways.

+ Reply to Thread

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