Closed Thread
Results 1 to 11 of 11

Split a file into multiple files

  1. #1
    Registered User
    Join Date
    08-11-2009
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2003
    Posts
    5

    Question Split a file into multiple files

    i have a file that is 10,000+ lines and need to break it every 900 lines into a new file. Is there a way in excel to accomplish this?

  2. #2
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: Split a file into multiple files

    Hi
    Create a sub folder called split990 in C drive and try the following macro codes.
    Please Login or Register  to view this content.
    Ravi

  3. #3
    Registered User
    Join Date
    08-11-2009
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2003
    Posts
    5

    Question Re: Split a file into multiple files

    Ravi,

    Thanks for the code - One more thing is it possable to have the header in Line 1 copied to each new file in line one?

  4. #4
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: Split a file into multiple files

    HI
    try the following modification. Change ski.xls to the current file name. A1:Z1 to the range of header length.
    Please Login or Register  to view this content.
    Ravi

  5. #5
    Registered User
    Join Date
    08-11-2009
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Split a file into multiple files

    That is fantastic - THANKS

  6. #6
    Registered User
    Join Date
    08-11-2009
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Split a file into multiple files

    where in the macro should I put code to rename "Sheet 1" on each file it saves?

  7. #7
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: Split a file into multiple files

    Hi
    insert the code in bold as shown
    Please Login or Register  to view this content.
    Ravi

  8. #8
    Registered User
    Join Date
    08-11-2009
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Split a file into multiple files

    Thank you very much

  9. #9
    Registered User
    Join Date
    12-13-2011
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Split a file into multiple files

    ravishankar this is amazing. I appreciate your time with this, it is going to help me tremendously. Are you aware of anyway to name these outputs.I need to have a internal file number that just has an auto incrementing file number?

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,929

    Re: Split a file into multiple files

    @phenicie

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Split a file into multiple files

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

Closed 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