+ Reply to Thread
Results 1 to 10 of 10

Split the excel data in worksheet to save it in two separate excel files

  1. #1
    Registered User
    Join Date
    03-09-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    7

    Question Split the excel data in worksheet to save it in two separate excel files

    Hi Friends,

    I need a help from you all for making a macro which helps me save some time.

    My query is very simple. Please find the below.

    Excel data consists of 1,000,000 rows and 50 columns with header in one worksheet.

    I need a macro such a way that when i run, the excel should split into two workbooks with 500,000 rows and 50 columns (exact half) respectively, Header in main workbook should copy and paste in that two workbooks and save with different filename like Split(1).xlsx and Split(2).xlsx.

    I have browsed many websites and watched many videos but I did not find any solution for this. Please help me

    Thanks in advance.
    Last edited by sat1591; 03-17-2014 at 08:42 AM.

  2. #2
    Registered User
    Join Date
    04-04-2013
    Location
    Prague
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Split the excel data in worksheet to save it in two separate excel files

    HI,

    hope this help. It is not set up just for 1MIO rows but always split in two files (half and half)

    cheers,

    Tomas

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-09-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Split the excel data in worksheet to save it in two separate excel files

    Awesome Tomas. I was expecting the same. I can manage by this code... Thanks for your help

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: [SOLVED]Split the excel data in worksheet to save it in two separate excel files

    Hi sat1591,

    Take some time to read: http://www.excelforum.com/forum-rule...rum-rules.html

    As common rule for most forums, crossposting is not allowed. While - you posted the same question here: http://www.mrexcel.com/forum/excel-q...cel-files.html
    Best Regards,

    Kaper

  5. #5
    Registered User
    Join Date
    03-09-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: [SOLVED]Split the excel data in worksheet to save it in two separate excel files

    Hi Kaper,

    Apologies for inconvenience caused, I am new to forums and I am not aware of this. I have posted the same question simultaneously ....

  6. #6
    Registered User
    Join Date
    03-09-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    7

    Exclamation Re:Split the excel data in worksheet to save it in two separate excel files

    Hi All,

    I need some little advanced VBA code for my task.

    Query:

    There are two excel sheets one with greater than 500,000 rows, 52 columns(consider WB1.xlsx) and less than 500,000 rows, 52 columns(consider WB2.xlsx).

    I need one VBA code such a way that all the columns in the workbooks should convert to text, Paste Special all the rows and columns and autofit itself.

    But the condition is,
    *If we are using WB1.xlsx the macro should do the above task and split into half, save in the some directory which i specify the path with some different names.

    *If we are using WB2.xlsx the macro should do the above mentioned task and save in the some directory which I specify the path. No need of splitting the workbook.

    Please Help!!

  7. #7
    Registered User
    Join Date
    03-09-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Split the excel data in worksheet to save it in two separate excel files

    Hi Friends,

    any luck on my query.

  8. #8
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: Split the excel data in worksheet to save it in two separate excel files

    Hi sat1591,
    First, it is now quite different question than the one from title.
    Second, you split the main file into two by some macro - natural way to do the same steps will be upgrading this macro.

    Having both in mind, my suggestion is that you start a new threas arrach small sample workbook with raw data, and the macro code which you already have. Also give there a link acknowledging source of the macro.

    Hope it helps.

  9. #9
    Registered User
    Join Date
    03-09-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Split the excel data in worksheet to save it in two separate excel files

    Quote Originally Posted by Kaper View Post
    Hi sat1591,
    First, it is now quite different question than the one from title.
    Second, you split the main file into two by some macro - natural way to do the same steps will be upgrading this macro.

    Having both in mind, my suggestion is that you start a new threas arrach small sample workbook with raw data, and the macro code which you already have. Also give there a link acknowledging source of the macro.

    Hope it helps.
    Hi Kaper,

    Thanks for ur suggestion. I will create a new thread and provide the sample's as requested

  10. #10
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: [SOLVED]Split the excel data in worksheet to save it in two separate excel files

    Hi sat1591,

    Let me autoquote:
    Quote Originally Posted by Kaper View Post
    This time you broke rule 12

+ 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. VBA code to split a worksheet into separate excel files.
    By sambo24 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2013, 06:15 AM
  2. [SOLVED] VBA to save multiple worksheets as separate CSV files using name of worksheet
    By Yg74 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2012, 10:55 AM
  3. VBA to save multiple worksheets as separate CSV files using name of worksheet
    By titushanke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2012, 08:08 AM
  4. [SOLVED] Split Large Excel file to multiple excel files and possible save the files
    By EnzioL in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-20-2012, 03:28 AM
  5. Split Excel report and save separate Workbooks to respective locations
    By seattle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2010, 03:30 AM

Tags for this Thread

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