guamlenahans
Board Regular
- Joined
- Oct 25, 2006
- Messages
- 113
I am using the macro below:
Sub DeleteBlankRows()
Dim x As Long
With ActiveSheet
For x = .Cells.SpecialCells(xlCellTypeLastCell).Row _
To 1 Step -1
If WorksheetFunction.CountA(.Rows(x)) = 0 Then
ActiveSheet.Rows(x).Delete
End If
Next
End With
End Sub
Trying to figure out how to modify it to delete all unused rows after row 110. Eventually want to delete all columns after Z as well on all sheets in the workbook. Any help is appreciated.
Sub DeleteBlankRows()
Dim x As Long
With ActiveSheet
For x = .Cells.SpecialCells(xlCellTypeLastCell).Row _
To 1 Step -1
If WorksheetFunction.CountA(.Rows(x)) = 0 Then
ActiveSheet.Rows(x).Delete
End If
Next
End With
End Sub
Trying to figure out how to modify it to delete all unused rows after row 110. Eventually want to delete all columns after Z as well on all sheets in the workbook. Any help is appreciated.