Option Explicit
Sub NoPeriod()
Dim i As Long, lr As Long
lr = Cells(Rows.Count, "O").End(xlUp).Row
For i = lr To 2 Step -1
If InStr(1, Range("O" & i), ".") = 0 Then
Range("O" & i).EntireRow.Delete
End If
Next i
End Sub
Code:Option Explicit Sub NoPeriod() Dim i As Long, lr As Long lr = Cells(Rows.Count, "O").End(xlUp).Row For i = lr To 2 Step -1 If InStr(1, Range("O" & i), ".") = 0 Then Range("O" & i).EntireRow.Delete End If Next i End Sub
Thank you for the quick response. This macro worked perfectly on a small file (100 rows) but when I tried to use it on a large file of 7000 rows it gave me the following error "type mismatch". Is there any way to work around that?
Thanks again for your help, greatly appreciated.
One possible problem with the red colored code line above... if the sentence has an abbreviation in it, but doesn't have a period at the end, for example...Code:Option Explicit Sub NoPeriod() Dim i As Long, lr As Long lr = Cells(Rows.Count, "O").End(xlUp).Row For i = lr To 2 Step -1 [B][COLOR="#FF0000"]If InStr(1, Range("O" & i), ".") = 0 Then[/COLOR][/B] Range("O" & i).EntireRow.Delete End If Next i End Sub