+ Reply to Thread
Results 1 to 12 of 12

Seperating a master worksheet into seperate sheets

  1. #1
    Registered User
    Join Date
    04-12-2012
    Location
    north carolina
    MS-Off Ver
    Excel 2003
    Posts
    7

    Seperating a master worksheet into seperate sheets

    I am trying to take a master spreadsheet and seperate it into worksheets by a specific column. The column that i want to use has the header of Letter Template. I think you can create a macro to do this but am a novice using vba. Any help will be appreciated.

    Thanks
    Attached Files Attached Files
    Last edited by pjbnjmb; 04-12-2012 at 08:21 PM. Reason: attaching example sheet

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Seperating a master worksheet into seperate sheets

    Try this...it will ask for the column to split out by and so you will just click on a cell withing that column.

    Please Login or Register  to view this content.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    04-12-2012
    Location
    north carolina
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Seperating a master worksheet into seperate sheets

    I just want to say that worked wonderfully. one more question though and if I cant do it then not a problem but it would be nice.... If the column I am sorting by has text that is to long would that be the reason why it just puts a number on the tabs? Is there anyway to fix that as I am not able to change the column text.

    Thank you so much, i am so excited

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Seperating a master worksheet into seperate sheets

    Can you post a sample here of what is in the column?

  5. #5
    Registered User
    Join Date
    04-12-2012
    Location
    north carolina
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Seperating a master worksheet into seperate sheets

    now I am getting an error when i went to run it again. I am getting a visual basic error 400?

  6. #6
    Registered User
    Join Date
    04-12-2012
    Location
    north carolina
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Seperating a master worksheet into seperate sheets

    I am attaching a screenshot of the error
    Attached Files Attached Files

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Seperating a master worksheet into seperate sheets

    What does the run time error say? Is it maybe 1004 - Cannot rename a sheet to the same as another sheet...

    This is because you have run the code once already and those sheets exist.

    Maybe this isn't the right code for your requirements. What are your requirements?

    From the master sheet, are you seperating the sheets once or is this a time after time event?

    Not sure on your last post and why you received that error. I cannot reproduce that error.

    How is your sheet different than what you posted?
    Last edited by jeffreybrown; 04-12-2012 at 09:42 PM.

  8. #8
    Registered User
    Join Date
    04-12-2012
    Location
    north carolina
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Seperating a master worksheet into seperate sheets

    I will need to run this macro once a day

  9. #9
    Registered User
    Join Date
    04-12-2012
    Location
    north carolina
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Seperating a master worksheet into seperate sheets

    the master file sheet is actually sheet 3 does that make a difference? sorry to be so much trouble

  10. #10
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Seperating a master worksheet into seperate sheets

    Okay, but more defined, my question, will you run this macro once a day with new data everyday (a new workbook everyday) or is the data continually being added to the master sheet. Do you want to add information to the main sheet and have it automatically added to its own sheet?

    If this is the case you could use this macro. Note it is a Worksheet change event which belongs in the sheet code.

    http://www.rondebruin.nl/code.htm

    Each sheet would be created (Keyword1 and Keyword2) and when that word is entered in column A then it would be transferred to the next open row on that sheet.

    Please Login or Register  to view this content.
    Please think about your requirements exactly because creating a macro is very specific to the exact requirements. Again, the macro in post #2 will create a sheet for every value in x column, but as you may have found out, if that sheet already exists you will get an area.

    I have to step away for the evening but I will get back to this thread as soon as possible.

  11. #11
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Seperating a master worksheet into seperate sheets

    No it does not matter what the name of the sheet is, the code in post #2 runs off of the ActiveSheet.

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    04-12-2012
    Location
    north carolina
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Seperating a master worksheet into seperate sheets

    I will actually have a master blank workbook that I will paste in new data to be sorted by a specific column daily. When I got the error I had actually opened up a new copy of the master file that had no "named sheets" created, and that is when I got the 1004 error. Thank you for all your help. I hope I am not confusing you to much. :S

+ 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