Deleting entire rows

  • Thread starter Thread starter Ed C
  • Start date Start date
E

Ed C

I would like to delete a collection of rows without using the absolute row
number; how does one do this?

Assume cursor is in row 25, column A
Something like: for i = 1 to 5
selection.row
selection.row.delete
next i

Thanks,

EdC
 
Hi Ed

how about

ActiveCell.Rows("1:1").EntireRow.Select
For i = 1 To 5
Selection.Delete Shift:=xlUp
Next

Cheers
JulieD
 
Try this

This will delete the activecell row + 4 rows below it

ActiveCell.Resize(5).EntireRow.Delete
 

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