+ Reply to Thread
Results 1 to 5 of 5

Macro Is Not Fast Enough ... How Edit Code For Speed ?

  1. #1
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,010

    Macro Is Not Fast Enough ... How Edit Code For Speed ?

    .

    The macro is applied to a filtered sheet. The user first selects the column letter, then clicks the command button, enters the term located in the selected column then enters how many blankd rows
    are to be inserted.

    With the attached example it takes several seconds to complete. If the worksheet will have tens of thousands of filtered rows it could take hours.

    How to edit to make it lightning fast ?

    Thank you.



    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,377

    Re: Macro Is Not Fast Enough ... How Edit Code For Speed ?

    You select an entire column, $T:$T. That means this:
    Please Login or Register  to view this content.
    is over a million rows. You need to determine the actual last row and work within that boundary.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,377

    Re: Macro Is Not Fast Enough ... How Edit Code For Speed ?

    Replace this:

    Please Login or Register  to view this content.
    with this:

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,010

    Re: Macro Is Not Fast Enough ... How Edit Code For Speed ?

    .
    Thank you. Got it !

    Cheers.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,377

    Re: Macro Is Not Fast Enough ... How Edit Code For Speed ?

    You're welcome. Thanks for the 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. Trying to speed up macro via formula or code (Countifs)
    By nickytraps in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 10-04-2018, 03:06 PM
  2. Reduction of code lines to speed up macro
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2016, 11:00 AM
  3. [SOLVED] Reduction of code lines to speed up macro
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2016, 11:00 AM
  4. Speed up macro - shapes slows code
    By Lukael in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2014, 01:29 PM
  5. How to improve the running speed of this VBA macro code?
    By sellim in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2012, 01:45 PM
  6. speed up vba code within excel macro
    By MOSHEBS in forum Excel General
    Replies: 3
    Last Post: 09-25-2011, 08:23 AM
  7. how to speed up macro code execution?
    By sharmanjali87 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-03-2010, 06:45 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