Leal72,
This might work for you. I wrote this for someone else wanting to do something similar so I have tried to modify it to meet you situation.
Here are a few things you need to keep in mind.
1. It starts from the bottom and works its way up. This is the easiest way to keep track of the rows when you are deleting rows.
2. It assumes that the last row is data you want to keep. If this is not the case, some modifications are going to need to be made.
Sub aaa()
Dim lRow As Long, lLastRow As Long, lCnt As Long
Dim wsSht As Worksheet
Set wsSht = Sheets("Sheet1")
lLastRow = wsSht.Cells(Rows.Count, "A").End(xlUp).Row
lCnt = 10
For lRow = lLastRow To 1 Step -1
If lCnt < 10 Then
wsSht.Range("A" & lRow).EntireRow.Delete
lCnt = lCnt + 1
Else
lCnt = 1
End If
Next lRow
End Sub
Try it and see if it does what you are wanting. You may have to make some modification. If you need more help, let me know and I will see what I can do.
Bookmarks