Following subroutine deletes all blank lines from current work sheet from the bottom with the range defined A1:Z50.
Sub DeleteRowsFromBottom()
Dim range As range, rows As Integer, i As Integer
Set range = ActiveSheet.range("A1:Z50")
rows = range.rows.Count
For i = rows To 1 Step (-1)
If WorksheetFunction.CountA(range.rows(i)) = 0 Then range.rows(i).Delete
Next
End Sub
Monday, December 22, 2014
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment