+ Reply to Thread
Results 1 to 4 of 4

want to speed up a loop algorithm

  1. #1
    Forum Contributor
    Join Date
    08-03-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    120

    want to speed up a loop algorithm

    whenever i run this vba it takes 10-15 minutes. is there a way to do this quicker or do i have to upgrade my hardware? thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: want to speed up a loop algorithm

    You have a loop 30 to 130 so line that you can delete will save 100 actions.

    You don't say if you have taken the basic steps to speed up excel.

    It is good practice to run something like my Optimise subroutine before running as macro with major loops:-

    Please Login or Register  to view this content.
    You need to run Deoptimise to reverse its effects:-

    Please Login or Register  to view this content.

    You should be aware as to the affects of the above. So if you want excel to calculate a workbook during your code, don't set the calculation mode to manual.

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

    Re: want to speed up a loop algorithm

    See if it still works - let me know if it's any quicker

    Please Login or Register  to view this content.
    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

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: want to speed up a loop algorithm

    This line works:

    Please Login or Register  to view this content.
    So Looking at your code, you can delete numerous lines :-

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to speed up loop code
    By notreallyIT in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-13-2013, 06:07 PM
  2. [SOLVED] Speed Up Loop in VBA
    By PY_ in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-19-2013, 08:57 AM
  3. [SOLVED] Help Speed up this Loop?!?
    By arleutwyler in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-06-2013, 01:49 AM
  4. Nested Loop problem/Algorithm
    By Asad74 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2012, 09:36 PM
  5. Trying to speed up the calculation my For Loop
    By Astroboy142 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2010, 04:32 AM

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