Remove blank rows in table

前端 未结 7 1641
心在旅途
心在旅途 2020-12-18 23:57

I\'m trying to run a macro that selects blank cells in a table column and deletes the entire row.

The script below does everything except the deleting part, which p

7条回答
  •  不思量自难忘°
    2020-12-19 00:23

    Adapting previous answers:

    On Error Resume Next
    Set Rng = ListObjects(1).DataBodyRange.SpecialCells(xlCellTypeBlanks)
    On Error GoTo 0
    If Not Rng Is Nothing Then
    Rng.Delete Shift:=xlUp
    End If
    

提交回复
热议问题