Delete Rows if any cell in Column H is blank but do not Delete Fir

G

Guest

Hi ,

I need to delete any row which has a blank cell in Column H. But I do not
want to delete the first row because this will have a "Title" even though
Column H is blank.
Thanks
 
G

Guest

Sub Macro1()
Dim i As Long
Set r = ActiveSheet.UsedRange
i = r.Rows.Count + r.Row - 1
For j = i To 2 Step -1
If IsEmpty(Cells(j, "H")) Then
Rows(j).EntireRow.Delete
End If
Next
End Sub
 
G

Guest

Thanks it works

Gary''s Student said:
Sub Macro1()
Dim i As Long
Set r = ActiveSheet.UsedRange
i = r.Rows.Count + r.Row - 1
For j = i To 2 Step -1
If IsEmpty(Cells(j, "H")) Then
Rows(j).EntireRow.Delete
End If
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top