I am trying to delete rows in a data sheet, that don't contain the names that I am specifying in the code below, but I am getting "Compile Error: Named argument not found" when I try to run this part of the code. It is highlighting Criteria3:= when it errors out. Is there a limit to the number of criteria you can use in AutoFilter, or am I just not structuring the code correctly? Thanks for any help you can give me!
With Range("F11:F5000").AutoFilter(Field:=6, Criteria1:="<>Donahue*", Operator:=xlOr, Criteria2:="<>Edgar*", Operator:=xlOr, _ Criteria3:="<>Honig*", Operator:=xlOr, Criteria4:="<>McHenry*", Operator:=xlOr, Criteria5:="<>Palmer, Robert", _ Operator:=xlOr, Criteria6:="<>Stockdale*", Operator:=xlOr, Criteria7:="<>Thatcher*", Operator:=xlOr, _ Criteria8:="<>Wolfe").SpecialCells(xlCellTypeVisible).EntireRow.Delete(xlUp) End With