ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Last Row (https://www.excelbanter.com/excel-programming/304563-re-last-row.html)

William[_2_]

Last Row
 
Hi scottnshelly

Glad to have helped.

If the last cell in Column A is "Total", then this will delete the entire
row.

Sub test()
If Range("A65000").End(xlUp) = "Total" Then _
Range("A65000").End(xlUp).EntireRow.Delete
End Sub


--
XL2002
Regards

William



"scottnshelly " wrote in
message ...
| thank a lot William,
| that worked perfectly!
| now, i guess i want something that will clear off the row that that
| macro added when the user goes to add another agent. so something
| like:
| range(a4:a).select
| search for 'total'
| clear off that row
|
| thanks.
|
|
| ---
| Message posted from
http://www.ExcelForum.com/
|




All times are GMT +1. The time now is 05:13 PM.

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