+ Reply to Thread
Results 1 to 6 of 6

speed up my code?

  1. #1
    mpeplow
    Guest

    speed up my code?

    I need speed!

    Can you help speed this up?
    (The files might be the problem, each file contains 35,760 lines of numbers,)
    I think the problem might be the file size. If anyone knows of a different way to store the file and import it that would be worth a shot.

    Please Login or Register  to view this content.
    Last edited by mpeplow; 06-17-2007 at 01:52 PM.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Modifying this section of code to do a bulk write to spreadsheet will speed things up. If one could find the file size before reading it in, the repeated ReDim statements could be avoided.
    Please Login or Register  to view this content.
    similarly for the second loop
    Please Login or Register  to view this content.
    Bulk write to spreadsheet is dramaticaly faster than repeatedly writing to one cell. If the files are the same length, it would be worth it to make TempArray two dimesional.
    Last edited by mikerickson; 06-17-2007 at 02:02 PM.

  3. #3
    mpeplow
    Guest
    I can already tell it's going much faster but I get an error 1004 ; Method of Gloabl object failed on this line of code

    Please Login or Register  to view this content.
    Any ideas? I can't figure it out.

    Thanks for your help.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Try this.
    Please Login or Register  to view this content.

  5. #5
    mpeplow
    Guest
    Much faster.

    Thank you.

  6. #6
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    You're welcome.

+ 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