+ Reply to Thread
Results 1 to 10 of 10

Split my data into separate worksheets

  1. #1
    Registered User
    Join Date
    03-01-2010
    Location
    NY,NY
    MS-Off Ver
    Excel 2003
    Posts
    7

    Split my data into separate worksheets

    Hello again,

    I'm looking to split the spreadsheet into different worksheets dependent upon the value in column 1 (VP). What would happen is a new worksheet would be created when a new VP is listed.

    I've attached an example. Please advise if you need more info.

    I thank you all in advance as I'm a complete excel macro newb.

    -drunk8gods
    Attached Files Attached Files
    Last edited by drunk8gods; 03-12-2010 at 10:38 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Split my data into separate worksheets

    Try this:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-01-2010
    Location
    NY,NY
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Split my data into separate worksheets

    Thanks for the code. It works perfectly, but I did neglect to include something.

    I've updated the sample spreadsheet to show a title on the worksheet. I was wondering if it was possible to have the title copy over on each of the worksheets when the macro splits it all up.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Split my data into separate worksheets

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

  5. #5
    Registered User
    Join Date
    03-01-2010
    Location
    NY,NY
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Split my data into separate worksheets

    Thanks for the updated code, just one item.

    - Is there a way to disable gridlines with the newly created worksheets?

    I was able to modify your code to assign widths to the columns of the newly created worksheets.

    I can't thank you enough again for the assistance.
    Last edited by drunk8gods; 03-12-2010 at 01:56 AM.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Split my data into separate worksheets

    Disable gridlines? You mean like in Tools > Options > View > Gridlines?

    Add in this line of code inside the For/Next loop:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-01-2010
    Location
    NY,NY
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Split my data into separate worksheets

    Worked like a charm! Thanks!

  8. #8
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Re: Split my data into separate worksheets

    JBeaucaire,

    I have very much the same spreadsheet, except I have one column heading at row A1 and no more column headings throughtout my spreadsheet. I have a list of Cities in alphabetically order and wanted to split all the cities out into separate worksheets as outlined here with VP. What would I modify so the code in not looking for VP column heading down the spreadsheet before it splits out to a separte worksheet?

    Thanks

    James
    ==========
    Bigroo1958
    Austin, Texas
    ==========

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Split my data into separate worksheets

    I don't know. Sounds like a completely different question.

    Start your new question in a new thread with a new sample wb and sample "results" sheets, just like you did to make this thread a success. You can cite this thread in your new one if you wish.

  10. #10
    Registered User
    Join Date
    03-01-2010
    Location
    NY,NY
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Split my data into separate worksheets

    Jbeaucaire,
    I'd give you more rep, but I already did on another thread, so it won't let me. :-)
    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