+ Reply to Thread
Results 1 to 9 of 9

Delete Visibile Rows on Filtered Criteria

  1. #1
    Forum Contributor
    Join Date
    06-30-2014
    Location
    London, England
    MS-Off Ver
    365 & 2010
    Posts
    102

    Delete Visibile Rows on Filtered Criteria

    Hullo You Beautiful people,

    This is driving me insane and I can't work out why Excel is struggling?

    The below macro looks for the word HAUTH in column U and should delete the special visible rows. It does what it says on the tin but it takes a fricking' age

    Please Login or Register  to view this content.
    It appears to be the:

    Please Login or Register  to view this content.
    that is taking an age? Sometimes over 3 minutes.

    Can anybody suggest anything to speed this up as I have a lot of macro's set up the same way and the file can take 20 minutes just deleting stuff that isn't needed.

    Help!!

  2. #2
    Forum Contributor
    Join Date
    06-30-2014
    Location
    London, England
    MS-Off Ver
    365 & 2010
    Posts
    102

    Re: Delete Visibile Rows on Filtered Criteria

    Can anybody help?

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,484

    Re: Delete Visibile Rows on Filtered Criteria

    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  4. #4
    Forum Contributor
    Join Date
    06-30-2014
    Location
    London, England
    MS-Off Ver
    365 & 2010
    Posts
    102

    Re: Delete Visibile Rows on Filtered Criteria

    Hi Sintek,

    Apologies for the delay only just got back to what I was working on.

    The code you have kindly supplied still isn't working speed wise.

    Below is my immediate window with debug start and end
    Please Login or Register  to view this content.
    Which is still running at 2 minutes.

    I should have said that the amount of HAUTH lines can exceed 1800 lines at any one time.

    This has really got me perplexed?

  5. #5
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,484

    Re: Delete Visibile Rows on Filtered Criteria

    Time for a file upload...See Top Yellow banner...No ways it will take that long...

  6. #6
    Forum Contributor
    Join Date
    06-30-2014
    Location
    London, England
    MS-Off Ver
    365 & 2010
    Posts
    102

    Re: Delete Visibile Rows on Filtered Criteria

    Ok, Give me 10 to clean it up and I will upload

  7. #7
    Forum Contributor
    Join Date
    06-30-2014
    Location
    London, England
    MS-Off Ver
    365 & 2010
    Posts
    102

    Re: Delete Visibile Rows on Filtered Criteria

    I think I have just worked it out... the file is on a network drive and when I am running the macro through the shared folder it is taking an age. When I do it from my desktop it is instant.

    Well this is a kick in the teeth

  8. #8
    Forum Contributor
    Join Date
    06-30-2014
    Location
    London, England
    MS-Off Ver
    365 & 2010
    Posts
    102

    Re: Delete Visibile Rows on Filtered Criteria

    Ok, maybe it isn't what I thought.

    When I run with the rest of my macro's this code takes an age. So I shut down excel reopen it and run the macro seperately and it is instant. So I must be clogging something up in the background when running all the macros?

    Any ideas?

    I have dim'd alot outside of the macro's do you think this could be causing the slow down.
    Please Login or Register  to view this content.
    Then started setting in the macro's.

    Looks like I may have to revisit all my other macros

  9. #9
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,484

    Re: Delete Visibile Rows on Filtered Criteria

    When I run with the rest of my macro's this code takes an age
    Problem not with this snippet of code then...Run each of the other macros separately and see which one is hogging time...
    I have dim'd alot outside of the macro's do you think this could be causing the slow down.
    See link on proper practice for declaration of variables...
    https://powerspreadsheets.com/declar...les-vba-excel/

+ 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. [SOLVED] Delete rows based on multiple criteria including COLOUR, or while FILTERED
    By Rabbitoh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-19-2020, 12:24 AM
  2. Replies: 10
    Last Post: 06-07-2018, 04:16 PM
  3. [SOLVED] Delete rows based on filtered criteria
    By Ramzes in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-08-2017, 07:01 AM
  4. [SOLVED] Delete Filtered Rows
    By Sgligori in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-11-2016, 11:05 AM
  5. Replies: 1
    Last Post: 04-08-2014, 02:50 AM
  6. Delete criteria when filtered
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-25-2011, 09:31 AM
  7. Replies: 4
    Last Post: 06-11-2010, 03:29 PM

Tags for this Thread

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