+ Reply to Thread
Results 1 to 5 of 5

delete entire blank rows

  1. #1
    Registered User
    Join Date
    08-02-2010
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    55

    Thumbs up delete entire blank rows

    Hi there!

    I would like to delete 2 blank rows only before new item.
    What i have done is like this:

    Please Login or Register  to view this content.
    But, this code will delete other rows as well. (You can try in the attachment).
    I have more than 2000 line of rows to do it manually.

    I'm still new in VBA.
    You help are most appreciate. Thanks!
    Attached Files Attached Files
    Last edited by isabella; 08-18-2010 at 09:08 PM.

  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,428

    Re: delete entire blank rows

    One way, based on your example:

    Please Login or Register  to view this content.


    You need to select a cell in the row to be deleted before pressing the button.

    Regards

  3. #3
    Registered User
    Join Date
    08-02-2010
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    55

    Re: delete entire blank rows

    Thank you for your respond TMShucks.

    It works, but I think it is not so practical for the user.

    I have the idea to do like this:
    If the range between A until E is empty, all rows will be deleted.
    I think looping might work but, I still have no luck to do it.

    Anyway, thanks for your help!

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: delete entire blank rows

    Try this

    Please Login or Register  to view this content.

    You might need to change this line
    Please Login or Register  to view this content.

    to this
    Please Login or Register  to view this content.
    in case column A is not the longest column of data.

    N.B. this also removes blank columns.

    Hope this helps
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Registered User
    Join Date
    08-02-2010
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    55

    Re: delete entire blank rows

    Great!

    Thank you very much Marcol. It works nicely.

+ 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