Is there any reason why this code would not delete rows that have empty cells in the 3rd column after being run only once???
It must be run about 6 or 7 times before all of the rows with empty cells are deleted.
Sub RemoveBlanks()
Dim oCell As Object
Worksheets("SO2REMOVAL1".Select
Application.Goto "R2C3"
Range(Selection, Selection.End(xlDown)).Select
For Each oCell In Selection
If oCell = "" Then
'Debug.Print oCell.Offset(0, -1).Value
Rows(RowIndex:=(oCell.Row)).Delete
End If
Next oCell
End Sub
It must be run about 6 or 7 times before all of the rows with empty cells are deleted.
Sub RemoveBlanks()
Dim oCell As Object
Worksheets("SO2REMOVAL1".Select
Application.Goto "R2C3"
Range(Selection, Selection.End(xlDown)).Select
For Each oCell In Selection
If oCell = "" Then
'Debug.Print oCell.Offset(0, -1).Value
Rows(RowIndex:=(oCell.Row)).Delete
End If
Next oCell
End Sub