I have written some code in Excel VBA below, which deletes rows based on user input. It almost completely works but in some cases leaves one or two instances of the search string in the data.

```
Dim SrchStr As String

'enter email address to be searched

SrchStr = InputBox("Enter email")

'open each file and if email address is found, delete that row and save workbook

Workbooks.Open File1
Dim Cell As Variant
Dim SrchRng As Range
Set SrchRng = ActiveSheet.UsedRange

For Each Cell In SrchRng
    If Cell.Value = SrchStr Then
        Cell.EntireRow.Delete
    End If
Next Cell

ActiveWorkbook.Close SaveChanges:=True

```