I\'m trying to delete rows which don\'t contain new words.
What I do:
Always run from the bottom to the top when deleting rows or you risk skipping rows (as you have noticed).
'don't dim inside a loop
Dim r As Long
Dim strArray As Variant
Dim intCount As Integer
Dim intWords As Integer
With Selection
For r = .Rows.Count To 1 Step -1
strArray = Split(Selection.Cells(r).Value & " ", " ")
intWords = 0
For intCount = LBound(strArray) To UBound(strArray) - 1
If dict.Exists(Trim(strArray(intCount))) Then
dict(Trim(strArray(intCount))) = dict(Trim(strArray(intCount))) + 1
Else
dict.Add Key:=Trim(strArray(intCount)), Item:=1
intWords = intWords + 1
End If
Next intCount
If intWords = 0 Then
.Cells(r).EntireRow.Delete
End If
Next r
End With