code skipped – no value picked in dynamic range – delete

My code give below is intended to do the following

Select A1 

Select A2:A10 , delete all values in this range

Select A11

Select A12:A21, delete all values in this range

 

    Sub del()

    Dim i As Long

    Range(“A1”).Select

    Do While i = 5

    i = i + 1

    ActiveCell.Range(“A” & ActiveCell.Row + 1 & “:A” & ActiveCell.Row + 10).Select

    Selection.ClearContents

    Cells(ActiveCell.Row + 1, 1).Select

    Loop

    End Sub

 

But this isn’t working . Code is skipping the picking the range part . please help. 

By: GK

Leave a Reply

Your email address will not be published. Required fields are marked *