+ Reply to Thread
Results 1 to 5 of 5

Automated Worksheet Creation from Cell Data

  1. #1
    Registered User
    Join Date
    01-26-2009
    Location
    Wilmington, DE
    MS-Off Ver
    Excel 2003
    Posts
    3

    Automated Worksheet Creation from Cell Data

    Is there a way to write a macro that will create new worksheets based on data in a particular cell? Here is my issue specifically: On a "master" worksheet, I have a drop-down menu within a cell that allows the user to select a number from 1-20. After selecting the number 6 (for example), I would like 6 new worksheets to be created, identical to another, separate worksheet. I can try to get more specific, but does anyone have any ideas on how to go about this with the information provided? Disclaimer: I'm new to macros. Thanks to whoever can help.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Automated Worksheet Creation from Cell Data

    Try this, change the sheet name you want copied.
    The code uses Worksheets("Summary").Range("A1") as the drop down value

    Please Login or Register  to view this content.
    Last edited by davesexcel; 02-02-2009 at 10:02 AM.

  3. #3
    Registered User
    Join Date
    01-26-2009
    Location
    Wilmington, DE
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Automated Worksheet Creation from Cell Data

    When I run this macro it just jumps to the sheet that needs to be copied but doesn't create new sheets based off the number selected in the drop-down. After using the drop-down to select a given number, I went to macros and selected run. Should I be doing something else? Thanks for the quick response.

  4. #4
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717

    Re: Automated Worksheet Creation from Cell Data

    Hi,

    Suppose you want to create copy of sheet1 no. of time selected by the drop down then u can use the below code... (Hope I have not misunderstood ur question)




    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-26-2009
    Location
    Wilmington, DE
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Automated Worksheet Creation from Cell Data

    Still nothing. I'm probably doing something wrong so here is my file specifically: There are two worksheets, one named "Master" and one named "Box 1." Within cell D16 on the "Master" worksheet is a drop-down box. Ideally, if I select a given number from the drop-down menu on the "Master" sheet, I would like an equal number of new worksheets created based on (copying) the "Box 1" sheet. If possible, I am also looking for these new worksheets to be named incrementally, such as Box 2, Box 3, Box 4, etc. This last part is not necessarily needed, just an added question.

    Also, I've been pasting the supplied code into Visual Basics, saving, then going to the drop-down menu and selecting a number, then running the macro. Is this process incorrect? This could be part of the problem. Thanks again.

+ 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