Hi,
try changing
With Sheets("IDs in IBM OU").Range("A1", Range("A" & Rows.Count).End(xlUp))
to
dim lastrow as integer
lastrow = Sheets("IDs in IBM OU").UsedRange.Rows.Count
With Sheets("IDs in IBM OU").Range("A1:A" & lastrow)
OR replace entirely with this code ..
Sub find()
Dim a As Variant, r As Range, lastrow As Integer
lastrow = Sheets("IDs in IBM OU").UsedRange.Rows.Count
For Each r In Sheets("IDs in IBM OU").Range("A1:A" & lastrow)
a = Application.Match("*EDS*", Columns(1), 0)
If IsError(a) Then
Else
Cells(a, 1).EntireRow.Delete
End If
Next r
End Sub
Bookmarks