+ Reply to Thread
Results 1 to 6 of 6

Slow VBA Loop Code

  1. #1
    Registered User
    Join Date
    04-27-2012
    Location
    Manchester, CT
    MS-Off Ver
    Excel 2010
    Posts
    3

    Slow VBA Loop Code

    I have a VBA loop code I wrote to move hourly data to a sheet set up in 5 minute intervals, entering the hourly data every 12 spaces. This code works but it takes >20 minutes to run one column of data. Is there any way to speed it up?
    Please Login or Register  to view this content.
    Last edited by royUK; 04-30-2012 at 08:41 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: Slow VBA Loop Code

    Hopes that it may run more quickly


    Please Login or Register  to view this content.
    Last edited by tigertiger; 04-30-2012 at 08:47 AM. Reason: added
    Best regard, -)iger-/iger
    If you are pleased with a solution mark your post SOLVED.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Slow VBA Loop Code

    Welcome to the Forum

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    I'll add them this time, but make sure taht you read the Forum Rules
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Contributor
    Join Date
    01-24-2011
    Location
    Sheppey
    MS-Off Ver
    Excel 2010
    Posts
    239

    Re: Slow VBA Loop Code

    Have you tried turning the calculation to manual at the start of the code then back to automatic at the end ( Application.Calculation )

  5. #5
    Registered User
    Join Date
    04-27-2012
    Location
    Manchester, CT
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Slow VBA Loop Code

    I tried the above suggested code and it worked perfectly, processing very fast now. Thank-you very much.

  6. #6
    Registered User
    Join Date
    04-27-2012
    Location
    Manchester, CT
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Slow VBA Loop Code

    Ok, my apoligies, I'll remember for next time.

+ 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