+ Reply to Thread
Results 1 to 3 of 3

Macro Speed

  1. #1
    Registered User
    Join Date
    06-13-2006
    Posts
    14

    Macro Speed

    I have writen a macro that checks up to 20,000 lines of data for a few different variables. The macro works fine it just takes quite some time to run. (about 5-10 minutes) The macro checks for these variables by the use of formulas within the worksheet then copies the formula down the column as far as needed. When I wrote the macro I was new to VBA. I used this forum to get ideas and it helped a lot!! Thanks everyone!

    Now here is the question-

    Does anyone think the macro would run faster if instead of putting a formula within the worksheet have tha macro work it out and loop through the sheet.

    OR

    Could it possibly run faster if I were to use a loop to copy the formula to each cell 1 row at a time?

    I'm guessing these ideas will not prove faster just because I'll still have to loop through some 20,000 rows of data but I wanted to get some of your opinions as I'm still a noob and thought it would be best to ask the experts.

  2. #2
    Forum Contributor
    Join Date
    01-13-2006
    Location
    Texas
    Posts
    161
    if you are writing back to the spreadsheet, turn screen updating off and see how that works for you.

  3. #3
    Registered User
    Join Date
    06-13-2006
    Posts
    14
    I have turned off screen update. It helped a little but not all that much. I think most of the time is being eaten up by calculating all the formulas that are being copied.
    Thanks for the suggestion though

+ 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