title: VBA range delete script
body: <p>I'm working with this table, and I need to write a script that recognizes the word carrots: and deletes one row above it and 7 row below it, including the actual row. </p>
  
  <p>I've tried multiple approaches but all of them are failing me for some reason, so I guess I'm missing something minor. </p>
  
  <pre><code>Sub delete()
  startRow = 19
  Set dataSheet = Sheets(1)
  
   endRow = dataSheet.UsedRange.Rows.Count
   Dim horse
  
    horse = Range(i - 1, i + 7)
  
  For i = startRow To endRow
  If (Cells(i, "A").Value) = "Entity:" Then
  Cells(horse, "A").EntireRow.delete
  
  End If
  Next i
  
  End Sub
  </code></pre>
  
  <p>I also tried, going cells(i-1,A).. Plus one to seven etc. Not working. looking for tips?</p>