Hi
I need to delete all rows if if the cell in U column is blank.
Sub a()
Worksheets("Testing Execution Data").Select
For i = 15 To 100
If Cells(i, 21).Value = "" Then
Cells(i, 21).Select
Rows(ActiveCell.Row).Select
Selection.Delete Shift:=xlUp
End If
Next
End Sub
But it is missing few rows. I think the problem is with my loop. Can anybody point out where I should correct?
Note: I have formula in U column. (=if(a1="","","Valid")
I need to delete all rows if if the cell in U column is blank.
Sub a()
Worksheets("Testing Execution Data").Select
For i = 15 To 100
If Cells(i, 21).Value = "" Then
Cells(i, 21).Select
Rows(ActiveCell.Row).Select
Selection.Delete Shift:=xlUp
End If
Next
End Sub
But it is missing few rows. I think the problem is with my loop. Can anybody point out where I should correct?
Note: I have formula in U column. (=if(a1="","","Valid")