The following will delete all rows where there is no data in the B column
Sub deleteRows()
Dim i As Long ' declares i as a long integer variable
Dim lRow As Long
lRow = Cells(Rows.Count, 1).End(xlUp).Row ' determines last row with data in 1st column
'Cells(rows.count) determines the highest row number
' .End(xlUp) finds the last row with data
' .Row grabs the row number
For i = lRow To 2 Step -1 'loops through rows from the bottom up
If Cells(i, 2) = "" Then 'checks to see if the B column in the current row is blank
Cells(i, 2).EntireRow.Delete 'if B cell is blank, delete the row
End If '"closes" the if statement
Next i 'loops to next i (row)
End Sub
Bookmarks