Delete alternate 9 rows with macro in excel [Closed]

Ask a question deep - Last answered on Apr 6, 2017 at 04:53 PM by Ambucias
Hi! I have a 301 rows in excel and would like to delete alternate 9 rows so that finally I will have data from the row 1,10,20 and so on (total 31 points). I came across macro to delete alternate row but struggling to translate this to delete alternate 9 rows.

Sub deleteAlternateRow()
Dim startAtRow, endAtRow, rowCounter As Long
startAtRow = 2
endAtRow = 100
For rowCounter = startAtRow To endAtRow
Selection.Delete Shift:=xlUp
End Sub
plus moins

Please, bare in mind that CCM is a mutual aid community, all answers on the forum are provided by volunteers who give their time free to help solve issues.

Hence we request that CCM forum users show mutual respect. Therefore, when asking for assistance, please be courteous, as for elsewhere in similar circumstances in every day society when asking for help. (Usually, how would someone ask for help? i.e. please, thank you, appreciate, grateful, etc.)

Being courteous will also increase your chances of getting the help you need.

Please, copy, modify and repost your message respecting the politeness charter.

We trust that you understand.


Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!