title: Excel Macro find text and select rows from that to next
body: <p>I need a macro to find this text:
  "XYZ" and "*Report"</p>
  
  <p>then select the rows from XYZ to *Report and delete all the rows including the selection.</p>
  
  <p>I've done this:</p>
  
  <pre><code>Sub DelWordsCol()
  
      Dim c As Range
      Dim d As Range
      Dim SrchRng
  
      Set SrchRng = ActiveSheet.Range("A1", ActiveSheet.Range("A65536").End(xlUp)
  
      Do
        set c=SrchRng.Find("XYZ", LookIn:=xlValues)
        if not c Is Nothing Then c.EntireRow.Delete
      Loop while Not c Is Nothing
  
      Do 
        set d=SrchRng.Find("*Report", LookIn:=xlValues)
         if not d Is Nothing Then d.EntireRow.Delete
      Loop while Not c Is Nothing
  
  End Sub
  </code></pre>
  
  <p>' i can't use resize as the no of rows from "XYZ" to "*.Report" can be 8 or 9 or anything.
  'I am able to delete the specific rows but not the range from "XYZ" to "*Report".</p>