+ Reply to Thread
Results 1 to 6 of 6

Speeding up a macro process

  1. #1
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Speeding up a macro process

    Hello!

    Im using this code to hide empty rows. It works fine but the problem is that I have a few graphs in this sheet and it takes really a lot of time to execute the macro.
    I was wondering if there is maybe a quicker way of running this macro like selecting the whole rows which are empty and hide them all at once instead of going one by one...


    Please Login or Register  to view this content.


    Thanks for the help!!

    Regards,

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Speeding up a macro process

    If there is no data above row 45, try turning on your macro recorder and filtering blanks from the B column. Make sure afterwards that you add the lines to set calc to manual and turn off screen updating. As a general rule, selecting cells, then executing commands on them is not nearly as fast as iterating through a collection such as the cells, rows or columns collection, or just using a built in Excel feature such as filtering.
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Speeding up a macro process

    Hi,

    Well there is actually data in those rows. It goes changing depending the input.

    Its a good way and very quick actually doing it with autofilters. The only thing is that I would not like to have the filter tab on the row...

    Regards,

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Speeding up a macro process

    Maybe this would work for you

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  5. #5
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Speeding up a macro process

    Try this...
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Speeding up a macro process

    And it works!!! Goes perfect gents!!!

    Thanks for all!! Good solution!

    Regardsss

+ 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