Delete alternate 9 rows with macro in excel [Closed]

deep - Apr 6, 2017 at 10:51 AM - Latest reply: Ambucias 52665 Posts Monday February 1, 2010Registration dateModeratorStatus June 24, 2018 Last seen
- Apr 6, 2017 at 04:53 PM
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
Rows(rowCounter).Select
Selection.Delete Shift:=xlUp
Next
End Sub
See more 

1 reply

Ambucias 52665 Posts Monday February 1, 2010Registration dateModeratorStatus June 24, 2018 Last seen - Apr 6, 2017 at 04:53 PM
0
Thank you
Greetings,

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.

http://ccm.net/contents/948-terms-of-use-for-ccm-respect-for-others

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

We trust that you understand.

Moderator