+ Reply to Thread
Results 1 to 5 of 5

Macro makes Sheet Crazy Slow to do anything.. 12+ seconds to insert row, how to fix?

  1. #1
    Registered User
    Join Date
    08-03-2012
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    17

    Exclamation Macro makes Sheet Crazy Slow to do anything.. 12+ seconds to insert row, how to fix?

    So i got an excel macro that copies and insert rows of data between 7500 other rows of data.

    Trouble is as it processes and the excel document gets bigger it starts to become incredibly slow over time.

    I assume this is because the document starts to have 15000 plus rows.

    I stopped the process because i wasn't sure if it was working. Turns out after about 7 hours it had only got about half way through the document. It is fast at first but starts slowing way down over time.

    Now if i manually insert a row after stopping operation, it loads my computer up for about 10 to 15 seconds. This i assume is why its going so slow? its taking almost a whole minute to insert one instance of the copied data.

    Is there a way to deal with this?

    In addition how would i modify the code so i could continue where i stopped the last macro? It was on row 3278. It processes from bottom to the top so i still have 3278 rows to go. I want to start from row 3278 but am not sure how to change the code or select a range for a macro.

    I have two different codes that work, im not sure which is faster:


    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Macro makes Sheet Crazy Slow to do anything.. 12+ seconds to insert row, how to fix?

    It sounds like the spreadsheet may be getting too big. 50 columns, 15,000 rows, presumably with formulas in 2 out of every 3 rows. Have you looked into a different method of analyzing your data?

  3. #3
    Registered User
    Join Date
    08-03-2012
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Macro makes Sheet Crazy Slow to do anything.. 12+ seconds to insert row, how to fix?

    WWhat other methods are there?

    This is only to do a product import for shopping cart so once its done its done

  4. #4
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Macro makes Sheet Crazy Slow to do anything.. 12+ seconds to insert row, how to fix?

    It's hard to answer that question without understanding your data layout and your expectations.

    I used clues from your existing code to figure out what type of data it was. I gathered that you had 50 columns of data and 7500 rows (to start). Then you mentioned that you insert 2 rows between each record, and copy/paste the info in rows 3:4. I assumed (since you are copying pasting) that at least some of the data in Rows 3:4 contain formulas.

    I mimiced this in a test file and ran it, and as expected, the file ran incredibly slow (perhaps not multiple hours slow, but definitely slow). Hence, I asked if there was an alternative approach you could use. Why specifically do you need to insert the rows, and do you need the formulas underneath? (These are somewhat rhetorical questions to see if we can arrive at a different, more efficient method). Alternatively, if you'd like to post a small sample of your workbook, I'd be happy to take a look at it.

  5. #5
    Registered User
    Join Date
    08-03-2012
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Macro makes Sheet Crazy Slow to do anything.. 12+ seconds to insert row, how to fix?

    Yup your assessment is correct.

    As i said this format is not my desired format.

    It is the format that must be used for my shoppping cart product import.

    Its just the nature of the beast.

+ 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