Delete a range of rows

L

Lotto

I want to change the code below to have a floating range, not fixed.
I"m sure this very simple, can someone help?

Range("P2").Select
Selection.End(xlDown).Select
Rows("2:77").Select
Range("I77").Activate
Selection.Delete Shift:=xlUp
 
B

Bernie Deitrick

Lotto,

Range(Range("P2"), Range("P2").End(xlDown)).EntireRow.Delete

HTH,
Bernie
MS Excel MVP
 

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

Top