There a variety of ways to do this ... some will loop but I quite like to use the following method:
![]()
Public Sub RemoveAccount() With Range(Cells(1, "B"), Cells(Rows.Count, "B").End(xlUp)).Offset(0, Columns.Count - 2) .FormulaR1C1 = "=IF(ISNUMBER(SEARCH(""Account"",RC2)),1,""x"")" .SpecialCells(xlCellTypeFormulas, xlNumbers).EntireRow.Delete .Clear End With End Sub
Bookmarks