How do continue an opertion until there is no more data? Or a specifeid number of times. I am deleting every other row, but I need it to continue for at leaast 100s of rows long:
' Keyboard Shortcut: Ctrl+w
'
Selection.EntireRow.Delete
Range("A2".Select
Selection.EntireRow.Delete
Range("A3".Select
Selection.EntireRow.Delete
Range("A4".Select
Selection.EntireRow.Delete
Range("A5".Select
Selection.EntireRow.Delete
Range("A6".Select
Selection.EntireRow.Delete
Range("A7".Select
Selection.EntireRow.Delete
Range("A8".Select
Selection.EntireRow.Delete
Range("A9".Select
Selection.EntireRow.Delete
Range("A10".Select
Selection.EntireRow.Delete
Range("A11".Select
Selection.EntireRow.Delete
Range("A12".Select
Selection.EntireRow.Delete
Range("A13".Select
Selection.EntireRow.Delete
Range("A14".Select
Selection.EntireRow.Delete
Range("A15".Select
Selection.EntireRow.Delete
Range("A16".Select
Selection.EntireRow.Delete
Range("A17".Select
Selection.EntireRow.Delete
Range("A18".Select
Selection.EntireRow.Delete
Range("A19".Select
Selection.EntireRow.Delete
Range("A20".Select
Selection.EntireRow.Delete
Range("A21".Select
Selection.EntireRow.Delete
Range("A22".Select
Selection.EntireRow.Delete
Range("A23".Select
Selection.EntireRow.Delete
Range("A24".Select
Selection.EntireRow.Delete
Range("A25".Select
Selection.EntireRow.Delete
Range("A26".Select
Selection.EntireRow.Delete
Range("A27".Select
Selection.EntireRow.Delete
Range("A28".Select
End Sub
' Keyboard Shortcut: Ctrl+w
'
Selection.EntireRow.Delete
Range("A2".Select
Selection.EntireRow.Delete
Range("A3".Select
Selection.EntireRow.Delete
Range("A4".Select
Selection.EntireRow.Delete
Range("A5".Select
Selection.EntireRow.Delete
Range("A6".Select
Selection.EntireRow.Delete
Range("A7".Select
Selection.EntireRow.Delete
Range("A8".Select
Selection.EntireRow.Delete
Range("A9".Select
Selection.EntireRow.Delete
Range("A10".Select
Selection.EntireRow.Delete
Range("A11".Select
Selection.EntireRow.Delete
Range("A12".Select
Selection.EntireRow.Delete
Range("A13".Select
Selection.EntireRow.Delete
Range("A14".Select
Selection.EntireRow.Delete
Range("A15".Select
Selection.EntireRow.Delete
Range("A16".Select
Selection.EntireRow.Delete
Range("A17".Select
Selection.EntireRow.Delete
Range("A18".Select
Selection.EntireRow.Delete
Range("A19".Select
Selection.EntireRow.Delete
Range("A20".Select
Selection.EntireRow.Delete
Range("A21".Select
Selection.EntireRow.Delete
Range("A22".Select
Selection.EntireRow.Delete
Range("A23".Select
Selection.EntireRow.Delete
Range("A24".Select
Selection.EntireRow.Delete
Range("A25".Select
Selection.EntireRow.Delete
Range("A26".Select
Selection.EntireRow.Delete
Range("A27".Select
Selection.EntireRow.Delete
Range("A28".Select
End Sub