+ Reply to Thread
Results 1 to 5 of 5

Split a workbook into multiple sheets with n number of rows

  1. #1
    Registered User
    Join Date
    05-25-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    9

    Split a workbook into multiple sheets with n number of rows

    My workbook is having 4 sheets. Sheet "A", "B", "C" & "D". Need to split the the workbook into multiple workbooks with each 25 rows.

    When splitting the Sheet "A" the file name should be saved as Sheet 1 A.xls, Sheet 2 A.xls like that when it take data from Sheet "B", it should continue with Sheet 3 B.xls and same way it should do for other sheets also.

    With my VBA knowledge I am not able to do this. But I am in need for help very badly. Will I get help?

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Split a workbook into multiple sheets with n number of rows

    Hi, dhanabharathi2,

    what about the sheets not reaching 25 rows (is it with header or without), should the number of records be raised to fit? Are the sheets of the same look? A workbook to play with could prove to be of some help in getting an answer.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Split a workbook into multiple sheets with n number of rows

    Hi, dhanabharathi2,

    furthermore you should be more careful when talking about the target: is it worksheest inside a workbook (which one) or is it a new workbook for each sheet?

    The code here assumes that these are all individual workbooks:
    Please Login or Register  to view this content.
    Or collect them inside the same workbook as new sheets:
    Please Login or Register  to view this content.
    Ciao,
    Holger

  4. #4
    Registered User
    Join Date
    05-25-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Split a workbook into multiple sheets with n number of rows

    Thanks for your reply.

    1. With heading
    2. For sheets not reaching 25 rows, not to raise to fit.
    3. All 4 sheets looks same.

    Also, below given code is working for me. However heading is missing. Can you help me out.





    Please Login or Register  to view this content.
    Last edited by dhanabharathi2; 02-05-2014 at 06:42 AM.

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Split a workbook into multiple sheets with n number of rows

    Hi, dhanabharathi2,

    before we would be able to help you you would need to add code-tags to the procedure according to our Forum Rules (here especially #3).

    Ciao,
    Holger

+ 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. Replies: 9
    Last Post: 06-06-2013, 11:25 PM
  2. Split Excel file into multiple files based on number of rows
    By kingtut86 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2013, 03:38 PM
  3. [SOLVED] Split master sheet data to multiple sheets in same workbook
    By Apple Ling in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2012, 10:39 PM
  4. [SOLVED] Split Macro modification to Split into new Workbooks instead of sheets within one workbook
    By DLSmith in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2012, 08:11 PM
  5. Copy rows from multiple sheets in one workbook into a different workbook
    By maneeshagr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-12-2012, 06:24 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