MACRO for Deleting every 2nd ROW

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello,

I want make a Macro for deleting in selection data every second row, plz
help me.

Thanks/Tufail
 
Sub abc()
Dim frow As Long, lrow As Long
Dim i As Long
frow = Selection.Row
lrow = Selection.Rows(Selection.Rows.Count).Row
For i = lrow To frow Step -2
Selection.Rows(i).Delete Shift:=xlShiftUp
Next

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top