deleting rows

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

Guest

i want a program that finds the last entry in column a and deletes all the
rows below it up to row 29 starting 5 rows below the last entry

if ("b29") is the value of the row i want to start deletine, why doesnt this
work?...

x = Range("b35")
Rows("y:29").Delete

i probably need a 'For Each c In Rows("5:29").Cells' statement or something...

any help? thanks
 
Try this

Dim lr As Long
lr = Range("A" & Rows.Count).End(xlUp).Row
Rows(lr + 5 & ":29").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