ali.b
2014/06/06, 10:19
Sub DeleteEmptyRows()
'
'This macro will delete all rows, which are missing data in a
'particular column, underneath and including the selected cell.
'
Dim Counter
Dim i As Integer
Counter = InputBox("Enter the total number of rows to process")
ActiveCell.Select
For i = 1 To Counter
If ActiveCell = "" Then
Selection.EntireRow.Delete
Counter = Counter - 1
Else
ActiveCell.Offset(1, 0).Select
End If
Next i
End Sub
'
'This macro will delete all rows, which are missing data in a
'particular column, underneath and including the selected cell.
'
Dim Counter
Dim i As Integer
Counter = InputBox("Enter the total number of rows to process")
ActiveCell.Select
For i = 1 To Counter
If ActiveCell = "" Then
Selection.EntireRow.Delete
Counter = Counter - 1
Else
ActiveCell.Offset(1, 0).Select
End If
Next i
End Sub