Deleting Rows Macro

  • Thread starter Thread starter Workbook
  • Start date Start date
W

Workbook

I'd like to create a macro that will search every row in columns A:L. Every
time columns I:L do not have contents inside of it, I would like the entire
row A:L to be deleted.
 
Sub DeleteRows()

FirstRow = 2
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For r = LastRow To FirstRow Step -1
If WorksheetFunction.CountBlank(Range("I" & r & ":L" & r)) = 4 Then
Rows(r).Delete
End If
Next
End Sub

Hopes this helps.
 
Works like a charm! Thank you for you're help

Per Jessen said:
Sub DeleteRows()

FirstRow = 2
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For r = LastRow To FirstRow Step -1
If WorksheetFunction.CountBlank(Range("I" & r & ":L" & r)) = 4 Then
Rows(r).Delete
End If
Next
End Sub

Hopes this helps.
 
Back
Top