Hey guys,
I am looking to modify my original code for a little more function.
I have cells B:O, that range from 20 - 300. What I am trying to do is create a function that looks through all of the cells B:O, and if all cells are blank, completely delete the row.
However I also only want this to occur between the 20 - 300, not to mess with anything outside of that range.
Any suggestions?
Dim lastrow As Long, f As Long
With ActiveSheet
On Error Resume Next
.Columns(3).SpecialCells(xlCellTypeFormulas, xlErrors).EntireRow.delete
On Error GoTo 0
lastrow = .Cells(Rows.count, 3).End(xlUp).Row
For f = lastrow To 1 Step -1
If .Range("E" & f).Value = "" And .Range("E" & f).Value = "" Then .Rows(f).delete
If .Range("G" & f).Value = "" And .Range("G" & f).Value = "" Then .Rows(f).delete
Next f
End With
Bookmarks