Efficient way to delete entire row if cell doesn’t contain ‘@’ [duplicate]
You don’t need a loop to do this. An autofilter is much more efficient. (similar to cursor vs. where clause in SQL) Autofilter all rows that don’t contain “@” and then delete them like this: Sub KeepOnlyAtSymbolRows() Dim ws As Worksheet Dim rng As Range Dim lastRow As Long Set ws = ActiveWorkbook.Sheets(“Sheet1”) lastRow = … Read more