+ Reply to Thread
Results 1 to 9 of 9

Delete blank rows in a table

  1. #1
    Forum Contributor
    Join Date
    02-26-2015
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    248

    Delete blank rows in a table

    Looking for a macro to delete blank rows in 3 separate tables in the same worksheet based on Col. A, Col. E and Col. I, starting from Row 11 of each table.
    Nothing I am trying is working.
    I've used multiple code found online but I can't get anything to work.
    I record my own macro and it works beautifully but then when I run it it doesn't work properly.
    Would appreciate any help.
    Thanks in advance.
    Attached Files Attached Files
    Last edited by BDD2015; 06-12-2021 at 12:16 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Delete blank rows in a table

    Try

    Please Login or Register  to view this content.
    Messages have been translated from Dutch to English by means of google translate.

  3. #3
    Forum Contributor
    Join Date
    02-26-2015
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    248

    Re: Delete blank rows in a table

    Thank you. Works great - almost. Problem is that when I get to this step in my project my tables strangely increase to over 16K rows. I resized the tables manually in my sample here. Works great in the sample. And thank you again. But takes so long to run this on the the actual 16K row tables. I don't expect to need more than 300 rows in each table. Is there a way to delete blank rows between 11-300?

    I have attached a new file that shows the rows I start out with but then when I run my delimiting macro, I end up with the 16K rows which unfortunately takes forever with your code.
    Last edited by BDD2015; 06-12-2021 at 12:19 PM.

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Delete blank rows in a table

    Please try

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

  5. #5
    Forum Contributor
    Join Date
    02-26-2015
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    248

    Re: Delete blank rows in a table

    Thank you. But it freezes at this line of code -
    << ReDim b(UBound(a), 1) >>

  6. #6
    Forum Contributor
    Join Date
    02-26-2015
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    248

    Re: Delete blank rows in a table

    Thank you. But it freezes at this line of code -
    << ReDim b(UBound(a), 1) >>

  7. #7
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: Delete blank rows in a table

    Why not cure the problem at source.
    It is your delimiting macro that is generating all the empty space.
    You are approaching this wrongly by correcting a fault that should not be generated in the first place.
    torachan.

  8. #8
    Forum Contributor
    Join Date
    02-26-2015
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    248

    Re: Delete blank rows in a table

    I figured that's where all the extra rows are coming from - Delimiting. But the data is strictly co-ordinates and I'm not sure how De-limiting would generate so many extra rows. Something to explore possibly. Sigh...

    Just figured it out - delimiting. Thank you for that suggestion.
    Last edited by BDD2015; 06-12-2021 at 02:20 PM.

  9. #9
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Delete blank rows in a table

    Nice and convenient. The file in the OP is different and the question is also different now

+ 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 blank rows in an Excel table using a VBA Macro
    By Excel987 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-12-2019, 11:21 PM
  2. [SOLVED] VBA Code to Delete All Blank Rows in Table
    By fredfarmer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-26-2019, 10:58 AM
  3. [SOLVED] Delete blank rows between blocks of data except two blank rows
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-26-2018, 11:18 AM
  4. [SOLVED] Delete "blank" rows in table
    By BDD2015 in forum Excel General
    Replies: 5
    Last Post: 12-17-2017, 09:16 PM
  5. [SOLVED] How to Delete Multiple Consecutive Blank Rows - Delete all Blank Rows
    By raw_geek in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-16-2012, 03:17 PM
  6. [SOLVED] Delete blank rows after filter - if no blank rows exit sub
    By cmb80 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-27-2012, 10:00 AM
  7. [SOLVED] Delete the Rows If it is Blank cell below Table header "Status"
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2012, 05:55 AM

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