macro to delete first 5 rows then after every 25

sanchit16

New member
Joined
Feb 1, 2012
Messages
11
Reaction score
0
Points
0
Location
New Delhi,India
hi,

I need a macro to delete first 5 rows then after every 25 rows again delete 5 rows.


Hope someone have a clue of it :)


thanks in advance!!!
 
Off the top

Code:
Dim lastrow As Long
Dim i As Long


    With ActiveSheet
    
        lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
        For i = lastrow + (30 - lastrow Mod 30) + 1 To 1 Step -30
        
            .Rows(i).Resize(5).Delete
        Next i
    End With
 
Back
Top