View Single Post
 
Old 10-02-2016, 11:18 AM
charlesdh charlesdh is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

Hi,

I erred on the previous code posted. The following code should work.

Code:
Sub DeleteBlank()
' remove rows with blank in column "B"

With Application
    .ScreenUpdating = False
    .Calculation = xlCalculationManual
End With


For Each cell In Range("A1", Cells(Rows.Count, "A").End(xlUp))
If Cells(cell.Row, 2).Value = "" Then
    Cells(cell.Row, 2).EntireRow.Delete
End If
Next
With Application
    .ScreenUpdating = True
    .Calculation = xlCalculationAutomatic
End With

End Sub
Reply With Quote