+ Reply to Thread
Results 1 to 7 of 7

need a createsheets macro that creates sheets based on a range

  1. #1
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    need a createsheets macro that creates sheets based on a range

    i have the following below for a button:

    Please Login or Register  to view this content.
    so what i need is the CreateSheets function, which right now only add's one page (sheet "B"). the sheet names start with A,B,C and go up to ZZZZZ (...X,Y,Z,AA,BB,CC...ZZ,AAA...ZZZZZ). I have all the sheets listed in a range (the formula's sheet, Column J, Row 19 to Row 148. i have a macro that loops through the sheets, left here so that you can see the functionality that I am looking for. note that Addfix is the variable that holds how many sheets are going to be created.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    how can i combine createsheets and dmcgov5 into one macro that adds the sheets based on the range that contains the sheets?
    see the navigation sheet for the add, delete and manage buttons.
    Create 1 - With Random Values.xlsm
    Last edited by dmcgov; 01-18-2016 at 04:05 PM. Reason: fixed typo and added current info, added createsheets macro

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: need a createsheets macro that creates sheets based on a range

    FWIW - I started trying to dissect your post and the attached workbook. As I got deeper it started to become confusing to me and more of a hassle so I decided to abandon assisting with this post. Others might be going through the same thing. Best of luck.
    If you are happy with my response please click the * in the lower left of my post.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: need a createsheets macro that creates sheets based on a range

    Hi dmcgov

    As convoluted as your Code is, I do believe I know what it is you're trying to accomplish. Let me play a bit...probably won't be tonight.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: need a createsheets macro that creates sheets based on a range

    thanks stnkynts, i appreciate the effort.

    and thanks jaslake for going the extra mile. i look forward to what you have in mind.

    some background.

    the createsheets () function that i need has to do to things
    1) start from 0 and add sheets
    or
    2) start from a value (1-130) and add sheets

    the sheets need to be named A,B,C,etc. note that when you get to Z, it goes AA,BB,CC...ZZZZZ.

    the rest of the routine works (as best as i could code it) so only need to make routine for adding sheets.

    hope this helps.
    Last edited by dmcgov; 01-19-2016 at 08:14 AM.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: need a createsheets macro that creates sheets based on a range

    Hi dmcgov

    In the attached I've added a Dynamic Named Range called "Exhibits"...
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    That Named Range is used in this section of Code...
    Please Login or Register  to view this content.
    The complete Code...
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: need a createsheets macro that creates sheets based on a range

    fantastic, one gold star for you. now let me add some functionality to the macro (need to populate a few cells with fixed data), might have another question but lets see how i fare. thanks again jaslake!!!

    so here are the changes that i made to your routine (just copying data to cells) and it works like a champ

    Please Login or Register  to view this content.

    thanks again for all your help!
    Last edited by dmcgov; 01-19-2016 at 01:48 PM.

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: need a createsheets macro that creates sheets based on a range

    You're welcome...glad I could help. Thanks for the Rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] User creates a single PDF for a chosen range of sheets in a workbook
    By Cagsy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-13-2016, 07:08 PM
  2. [SOLVED] Macro that creates sheets based on list
    By chicagoland8 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 10-08-2012, 06:43 PM
  3. [SOLVED] Macro that creates multiple sheets
    By WeskusTbone in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-20-2012, 04:09 AM
  4. [SOLVED] macro that creates new sheets for changes in value
    By Steve99999 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-03-2012, 10:43 AM
  5. Replies: 11
    Last Post: 02-13-2012, 06:10 PM
  6. Macro that creates duplicate sheets. Random Error.
    By timmtamm in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-07-2011, 12:25 PM
  7. macro creates new sheet with data from other sheets
    By jdcns in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-11-2011, 08:28 AM

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