Private Sub deleterows()
Dim n As Integer
n = ThisWorkbook.Worksheets("Sheet1").UsedRange.Rows.Count
Dim x As Integer
For x = 9 To n
If InStr(1, ThisWorkbook.Worksheets("Sheet1").Cells(x, 3).Value, "2015", vbTextCompare) = 0 Then
ThisWorkbook.Worksheets("Sheet1").Rows(x).Delete
x = x - 1
n = n - 1
If x >= n Then Exit Sub
End If
Next x
End Sub
how i can amend the same code.