+ Reply to Thread
Results 1 to 2 of 2

Split this up over different workbooks or sheets.

  1. #1
    Forum Contributor
    Join Date
    11-06-2012
    Posts
    139

    Split this up over different workbooks or sheets.

    Hi,

    I have a code that list all possible 7/41 combinations. But it's to big for one sheet because excel cannot handle this.

    How would you split this up with this code?
    Please Login or Register  to view this content.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Split this up over different workbooks or sheets.

    This is the same issue as your previous post: http://www.excelforum.com/excel-prog...e-of-code.html

    Yes, it is possible to use one set of code to create additional workbooks and insert data. However, it creates the new workbook(s) in the same instance of Excel.exe running on your system. Therefore, you will still hit the 1.5GB memory limit with this task and generate the error. You're creating a SERIOUS amount of data with this nested loop. Since .xlsx/.xlsm files are really just compressed (zipped) files of xml data, the 98MB file actually decompresses upon launch and uses 800MB+ of memory. The same applies to the second workbook I showed you how to create, although it's slightly smaller when compressed and decompressed. We're still talking 1.4-1.5GB of memory just having both open and not doing anything with them.

    I do have one serious question for you -- why, if I've shown you how to generate the list once over the span of two workbooks, would you EVER need to create such a list again?? Once you have such a list it's there for good. Create copies of it if you want to make changes, keeping the original intact.

    If you really want to generate this list in one (or even two) workbooks at the same time, I'd suggest getting a 64-bit PC and 64-bit version of Excel. From what I've read it will be able to handle the memory requirements. (Or find someone who knows how to use VBA to clear memory from an active Windows process during runtime in 32-bit.)

+ 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: 2
    Last Post: 11-29-2012, 04:56 AM
  2. Replies: 0
    Last Post: 11-29-2012, 04:50 AM
  3. [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
  4. split Workbooks to multiple workbooks with multitabs
    By xanto in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2010, 06:47 PM
  5. [SOLVED] How to split and consolidate sheets into new workbooks
    By Xluser@work in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-21-2006, 05:17 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