Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jared,
This might be what you want Sub Test() Dim iLastRow As Long Dim i As Long iLastRow = Cells(Rows.Count, "A").End(xlUp).Row If iLastRow Mod 3 < 1 Then iLastRow = iLastRow - 1 If iLastRow Mod 3 < 1 Then iLastRow = iLastRow - 1 For i = iLastRow To 1 Step -3 Rows(i).Resize(2).Delete Next i End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "jared" wrote in message oups.com... I am looking to have a macro delete 2 rows then skip 1 row and delete the next two. I have over 18,000 rows and I really would rather not do this the manual way. :) Thanks, Jared |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Quick Macro question - How to delete two rows then skip one - and repeat | Excel Discussion (Misc queries) | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
How to delete rows when List toolbar's "delete" isnt highlighted? | Excel Worksheet Functions | |||
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below | Excel Programming |