用VBA:- Sub DeleteEmptyRows()
- Dim LastRow As Long, r As Long
- LastRow = ActiveSheet.UsedRange.Rows.Count
- LastRow = LastRow + ActiveSheet.UsedRange.Row -1
- For r = LastRow To 1 Step -1
- If WorksheetFunction.CountA(Rows(r)) = 0 Then Rows(r).Delete
- Next r
- End Sub
复制代码 参考:http://www.jb51.net/office/excel/62172.html |