Excel - A macro to delete alternate rows


I want to delete every alternate row from my work sheet. I tried recording macro, but it only deletes a particular row as shown below (Row 4:4). How can this macro be converted to a more versatile one?

Sub Macro3()   
 Macro3 Macro   
 Keyboard Shortcut: Ctrl+q   
Selection.Delete Shift:=xlUp   
End Sub  


Just use the macro below:
Sub deleteAlternateRow()  
Dim startAtRow, endAtRow, rowCounter As Long  
startAtRow = 2  
endAtRow = 100  
For rowCounter = startAtRow To endAtRow  
    Selection.Delete Shift:=xlUp  
End Sub 

Note that

Thanks to rizvisa1 for this tip on the forum.
Published by aakai1056. Latest update on September 3, 2012 at 12:06 PM by jad05.
This document, titled "Excel - A macro to delete alternate rows," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (https://ccm.net/).
Outlook - A macro to create folders
Outlook 2007 - Cannot find the file or Office12 SCANPST