I have a loop that when it runs, will delete the cells in column K that have the text "No AF". Here is my code:
If .Range("B7") = "N" Then
For i = 1 To 100
If (.Range("K" & i).Value) Like "*No AF*" Then
.Range("K" & i).Delete
End If
Next
End If
When I run the code, it does delete all cells but one that contain the text "No AF". I then have to run the code a second time to get rid of the last cell that contains "No AF". Why do I have to run the code twice and how can I fix this.
Thanks,
GCC