![]() |
How to select a row to delete
What is the format for selecting a row to delete? The
problem is the row that needs to be deleted will change. The good news is that the activecell in column A will always be on the row that needs to be deleted. Is there a way to go ahead and tell Excel to highlight the row that the activecell is on and delete? Below is the basic code for deleing a row, however it specifies the row directly. What do I need to change? Rows("1:1").Select Selection.Delete Shift:=xlUp |
How to select a row to delete
Hi Jeff,
activecell.entirerow.delete Some more infomation on deleting rows in the #rows area of Delete Cells/Rows in Range, based on empty cells, or cells with specific values http://www.mvps.org/dmcritchie/excel/delempty.htm#rows -- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Jeff Armstrong" wrote in message ... What is the format for selecting a row to delete? The problem is the row that needs to be deleted will change. The good news is that the activecell in column A will always be on the row that needs to be deleted. Is there a way to go ahead and tell Excel to highlight the row that the activecell is on and delete? Below is the basic code for deleing a row, however it specifies the row directly. What do I need to change? Rows("1:1").Select Selection.Delete Shift:=xlUp |
All times are GMT +1. The time now is 07:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com