deleting rows
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 |
deleting rows
Try this
Dim lr As Long lr = Range("A" & Rows.Count).End(xlUp).Row Rows(lr + 5 & ":29").Delete -- Regards Ron de Bruin http://www.rondebruin.nl "lawson" wrote in message ... 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 |
All times are GMT +1. The time now is 10:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com