+ Reply to Thread
Results 1 to 11 of 11

Modification Help Needed 649 Combination Generator Code

  1. #1
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    107

    Modification Help Needed 649 Combination Generator Code

    Hi All

    I've been using the following code to generate all the possible 649 combinations. This code will create a sheet containing the combinations, the combinations will be 1,000,000 lines long on Part001, Part002, etc, up to Part014. When I run this after the first couple of parts my computer really starts to slow down until it eventually crawls to the end and all the combinations have been generated.

    Is there a way to modify the code that after each part is generated the file is saved and that part is closed? And then the next part can be generated saved and closed and so on until all combinations have been generated, thus helping pervent my computer from slowing down to the speed of a snail? Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Modification Help Needed 649 Combination Generator Code

    The whole 13983816 should fit on one sheet - I suggest that you declare an array of the proper proportions and do it in core
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    107

    Re: Modification Help Needed 649 Combination Generator Code

    I'm using Excel 2007. Max rows is 1,048,576

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Modification Help Needed 649 Combination Generator Code

    And 16,384 columns - that's 17,179,869,184 cells ???

  5. #5
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    107

    Re: Modification Help Needed 649 Combination Generator Code

    Quote Originally Posted by xladept View Post
    And 16,384 columns - that's 17,179,869,184 cells ???
    True, never thought of it that way.

    So how would I modify the code to have it all on one sheet

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Modification Help Needed 649 Combination Generator Code

    Well - on your split - just start on - the column offset by 6 (or whatever) - you've got 16300 extra columns.

    But why don't you see if you can build the whole thing in core - you don't want to load your system with a 25% full spreadsheet?? If it builds in 6*13983816 nanoseconds, it would be well worth it to use that way!

  7. #7
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    107

    Re: Modification Help Needed 649 Combination Generator Code

    I'll give it a try

    But, I'd still like to know if it's possible that after each part is generated the file is saved and that part is closed? An how would it be written?

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Modification Help Needed 649 Combination Generator Code

    Maybe something like this:

    Please Login or Register  to view this content.
    Last edited by xladept; 02-04-2013 at 04:06 PM.

  9. #9
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    107

    Re: Modification Help Needed 649 Combination Generator Code

    Thanks xladept, I'll give it a try and see if I can make it work.

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Modification Help Needed 649 Combination Generator Code

    You've gotten me interested in this - please let me know!

  11. #11
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    107

    Re: Modification Help Needed 649 Combination Generator Code

    Will do, 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