Try using this, I simply made a command button and put this in it.
Code:
Private Sub CommandButton1_Click()
'Purpose: to delete an entire row if a specific column has no data.
'By Simi
'created 10-8-12
'declare variables
Dim lRows As Long
Dim lCurrentRow As Long
lCurrentRow = 1
With ActiveSheet
lRows = .Range("A" & .Rows.Count).End(xlUp).Offset(1, 0).Row
Do While lCurrentRow < lRows
If IsEmpty(.Range("A" & lCurrentRow)) = True Then
.Range("A" & lCurrentRow).EntireRow.Delete
lRows = lRows - 1 'decrease total amount of rows because we deleted 1.
Else
lCurrentRow = lCurrentRow + 1 'increment to continue evaluating
End If
Loop
End With
End Sub
Bookmarks