+ Reply to Thread
Results 1 to 4 of 4

Delete visible filtered rows

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,955

    Delete visible filtered rows

    I've got a spreadsheet with 900K rows. In my Values column I have a lot of zero values, so need to delete those. My code for deleting them is below, but the deletion is VERY slow. Any ideas on how to speed it up? I've already turned off ScreenUpdating, Calculations, etc.
    Please Login or Register  to view this content.
    would it help if I sorted by Zeroes before deleting?
    I know I'm not stupid, but I suspect I'm a lot stupider than I think I am

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,276

    Re: Delete visible filtered rows

    Yes, sorting should make it a lot faster.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Delete visible filtered rows

    Hi jomili,

    Time to learn Power Query? If you do this often then it might be worth the effort. VBA and 900K rows will take a long time.... Sorry.

    Here is an example of PQ. Created a table and removed zero values in less than a minute. Easy Peasy!!

    Power Query remove zero values from table.xlsx
    Last edited by MarvinP; 02-14-2019 at 12:23 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,955

    Re: Delete visible filtered rows

    I'm certainly ready for PQ, but my organization isn't. That's one of the tools they haven't yet allowed us to use. But I keep pushing.

    BTW, I redid my filter/delete macro as shown below. MUCH faster!
    Please Login or Register  to view this content.

+ 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] Selecting the first x visible rows of a filtered table
    By DreamEyes in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-27-2017, 11:05 AM
  2. [SOLVED] Format Filtered Visible Rows of Table
    By Redled89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2017, 12:40 AM
  3. Replies: 5
    Last Post: 05-20-2014, 09:35 PM
  4. Need some help on dynamic dropdow for filtered row or for visible rows only
    By dvpnp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-05-2013, 12:21 PM
  5. [SOLVED] Delete filtered (visible) row but not heading
    By mhoude in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-22-2012, 12:57 PM
  6. Excel 2007 : Copy Visible Filtered Rows between worksheets
    By lmsexcelforum in forum Excel General
    Replies: 0
    Last Post: 05-17-2009, 12:40 PM
  7. Replies: 0
    Last Post: 04-02-2009, 09:28 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