Results 1 to 11 of 11

Thread: Solved: Delete Unused rows in a table

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    VBAX Expert
    Joined
    Feb 2010
    Posts
    696
    Location
    Quote Originally Posted by fredlo2010
    here is the sample of the workbook

    Delete Empty rows.xlsx

    Thanks
    Following Kenneth's note, try this amended version, which saves the workbook automatically:

    [vba]
    Sub Delete_Empty_Rows_Table()
    Dim blankRng As Range
    On Error Resume Next
    Set blankRng = Range("B7:B10000").SpecialCells(xlCellTypeBlanks)
    blankRng.Delete shift:=xlUp
    On Error GoTo 0
    ThisWorkbook.Save
    End Sub
    [/vba]
    Last edited by Opv; 05-25-2012 at 06:46 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •