title: VBA: How to delete the next three rows based on criteria?
body: <p>I have this code that only deletes the row containing the letters <strong>PGM:AGEDP</strong>  but I don't know how to delete the next <strong>three rows</strong> following the first delete. The three rows after <strong>PGM:AGEDP</strong> row are junk they contain some letters, numbers and symbols which come in variety everytime but letters <strong>PGM:AGEDP</strong> will always stay the same . Just for simplicity, if the first row contains the letters then it should be deleted with the bottom three more rows.These four rows come very offend in the whole worksheet more than 30Xs</p>
  
  <pre><code>Sub RemovingPGM()
  
  Dim ws As Worksheet
  For Each ws In Sheets
  ws.Activate
  
    Dim n As Long
      Dim nlast As Long
      Dim rw As Range
      Set rw = ActiveWorkbook.ActiveSheet.UsedRange.Rows
      nlast = rw.Count
      For n = nlast To 1 Step -1
          If (rw.Cells(n, 1).Value = "PGM:AGEDP") Then
              rw.Rows(n).Delete
          End If
      Next n
      Next ws
  End Sub
  </code></pre>
  
  <p>Any question regarding further explanation please feel free to ask.</p>