+ Reply to Thread
Results 1 to 5 of 5

how to Create multiple worksheet based on cell value!!!

  1. #1
    Registered User
    Join Date
    07-15-2007
    Posts
    3

    how to Create multiple worksheet based on cell value!!!

    hi can some plz help with vb code/macro for the following function.

    Basically i want to create X number of worksheets and then give them names A,B,C,D,E,G.....and soo on. The number of worksheets i.e X is a variable cell value from another sheet e.g. on sheet1 value of X is lets just say 6. i will then need to create six new sheets named A,B,C,D,E,F

    can anyone please help me i would greatly appreaciate your help.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: how to Create multiple worksheet based on cell value!!!

    Perhaps:

    Please Login or Register  to view this content.
    You will get errors if you try and re-run the routine... ie recreate 'A' if it already exists... you don't specify what you would want to do were this to occur.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: how to Create multiple worksheet based on cell value!!!

    As per the other forum please ensure you publish other links should you choose to x-post in other forums:

    http://www.mrexcel.com/forum/showthread.php?t=368020

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

    Re: how to Create multiple worksheet based on cell value!!!

    Try this to start
    Please Login or Register  to view this content.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: how to Create multiple worksheet based on cell value!!!

    Chr64 method is flawed if you add > 26 sheets.... far better to use Address approach IMO.

    On an aside it is my understanding that Integer type is converted to Long under the hood in 32-bit VBA so is a moot type (only really useful if you intend to use as a sanity check... ie to generate overflow else you're better off using Long... obviously Byte etc if possible)
    Last edited by DonkeyOte; 01-31-2009 at 10:47 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