I have a list of entries in Excel 2010 that lose their importance if a certain information about each entry is "YES". Therefore I want to delete those lines as soon as the certain information is set to "YES" (the field is either "YES" or "NO").

My entries look like this:

```
*valuerow1*   *valuerow1*   *valuerow1* … "YES/NO"

*valuerow2*   *valuerow2*   *valuerow2* … "YES/NO"

*valuerow3*   *valuerow3*   *valuerow3* … "YES/NO"

```

I have found code that will delete the desired lines BUT before it does, I have to set the range manually in a pop-up window. However the point of the application is, that it runs automatically and the user should not need to set a range.
Since I haven't written the following code myself and don't fully understand it because I'm totally new to coding, I fail to adapt what I have so far.
Btw the column holding the values "YES" or "NO" is column E.

This is the code that I have so far:

```
Sub Delete_Offene_Aufträge_Zurückgegeben_Ja()

    Dim Rng As Range
    Dim WorkRng As Range
    On Error Resume Next
    xTitleId = "KutoolsforExcel"
    Set WorkRng = Application.Selection
    Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
       Application.ScreenUpdating = False
    Do
    Set Rng = WorkRng.Find("YES", LookIn:=xlValues)
      If Not Rng Is Nothing Then
        Rng.EntireRow.Delete
      End If
        Loop While Not Rng Is Nothing
        Application.ScreenUpdating = True
    End Sub

```

Thank you in advance for any help!