+ Reply to Thread
Results 1 to 4 of 4

Make code run faster

  1. #1
    Registered User
    Join Date
    06-04-2011
    Location
    NSW Australia
    MS-Off Ver
    Excel 2007
    Posts
    43

    Make code run faster

    Hello

    I have this code that works exactly as I want it to, but slowly. It takes about 10 or so seconds to run. What options do I have to make it run faster.

    Thanks.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Make code run faster

    Try this...

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    You could get rid of Select, turn off screen updating, set calculation to manual...

    In the following I've not changed the code after the loop as it's not clear what's being copied.

    Please Login or Register  to view this content.
    Another thing you could consider is using a filter.
    Last edited by Norie; 02-20-2013 at 06:09 AM.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    06-04-2011
    Location
    NSW Australia
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Make code run faster

    It was actually taking up to 20 seconds to run.

    Sixthsense - your code took about five seconds off - thankyou

    Norie - yours bought it down to about 1.5 - thankyou

    Learning a lot about vba, but stil got a long way to go. I'm going to study your responses to try and make it better in the future.

+ 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