Results 1 to 5 of 5

delete entire blank rows

Threaded View

  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:

    Private Sub btnDelete_Click()
        Range("1:1").SpecialCells(xlCellTypeBlanks).EntireColumn.Delete xlShiftToLeft
        Range("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete xlShiftUp
    End Sub
    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.

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