+ Reply to Thread
Results 1 to 5 of 5

Can we speed this up??

  1. #1
    Forum Contributor
    Join Date
    09-22-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 2019
    Posts
    309

    Can we speed this up??

    One of the worksheets in my workbook (Teams & Runners Data Form Entry) has 42 columns of information in it with a variable amount of rows.

    I need to copy the information out of columns F, R, X, AD, AJ and paste them as a list in a second worksheet (Clash Check) so that all the they appear under each other in column B of "Clash Check", columns J, P, V, AB, AH, AN need to list in Clash Check in column C and columns G, M, S, Y, AE, AK list in column D of Clash Check. The whole lot is then sorted A - Z by column C.

    The Code I currently have works but it takes an age to complete (like, cup of tea and a pee age!). I can watch the columns slowly fill in on the Clash Check sheet but once the job appears to be done, the sheet appears to freeze and I can't do anything with it, (which is where a lot of the time is being taken I think). It's not the power of the computer, so I think there may be something wrong with the Code.

    My code then "should" go on to find duplicates in column C, but I've commented that out to try and speed things up without success.

    Here's the Code
    Please Login or Register  to view this content.
    It may be that the code is trying to copy and paste complete columns rather than just up to the last row of data, but I'm not sure how to fix that either.

    Any ideas why this takes so long to execute please?

    Assistance really appreciated as usual!

    Frankie

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Can we speed this up??

    Hi, the code doesn't really look good, but how about attaching the file with the macros without it and to see what other settings you have in the file is hard to tell.
    Probably events that need to be disabled, screen updating turned off, etc and it will help some, but a little more strcuture to te code will also help.
    Add the following to the beginning
    Please Login or Register  to view this content.
    And this before the end sub
    Please Login or Register  to view this content.
    PS check for syntax errors but this is the main idea for starters
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Can we speed this up??

    Try this for starters.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Forum Contributor
    Join Date
    09-22-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 2019
    Posts
    309

    Re: Can we speed this up??

    Thanks Bakerman2. You're Wizard!!!

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Can we speed this up??

    You're welcome and thanks for rep+.

+ 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 avoid cell SELECTION but still format cells to speed up the macro running speed
    By BeefyBerts in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-05-2018, 08:18 AM
  2. Everage Speed km/time (european speed)
    By GerryZucca in forum Excel General
    Replies: 3
    Last Post: 02-23-2015, 03:02 PM
  3. Speed up VBA Sub
    By shawnweber in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-19-2014, 07:30 AM
  4. VBA speed up
    By bensonsearch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2011, 02:46 AM
  5. [SOLVED] How to speed up VBA?
    By Cactus in forum Excel General
    Replies: 3
    Last Post: 06-14-2005, 11:05 AM
  6. Speed me up please with VBA
    By cdjsb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-12-2005, 11:34 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