ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete rows after used cell? (https://www.excelbanter.com/excel-programming/280997-delete-rows-after-used-cell.html)

JayL.

Delete rows after used cell?
 
Good day,
I have a spreadsheet where I need to delete all the rows after the last used
cell in column B. How can I do this in a macro?

TIA



J.E. McGimpsey

Delete rows after used cell?
 
One way:

With Cells(Rows.Count, 2)
Range(.End(xlUp).Offset(1, 0), .Cells).EntireRow.Delete
End With


In article <Eh_nb.59258$Tr4.139820@attbi_s03,
"JayL." wrote:

Good day,
I have a spreadsheet where I need to delete all the rows after the last used
cell in column B. How can I do this in a macro?

TIA




All times are GMT +1. The time now is 01:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com