ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting Row (https://www.excelbanter.com/excel-programming/303384-deleting-row.html)

gregork

Deleting Row
 
I'm still grappling with a code for deleting an entire row from a sheet. I'm
getting nowhere so I was hoping someone could start me on the right track
with a sample code here's the details:

On Sheet 1, Cell A1 is a 5 Digit number I want to lookup on Sheet 2, Range
A2:A1000 and then delete the entire row corresponding to the number.

Cheers
gregorK



MSP77079[_30_]

Deleting Row
 
On Sheet 1, Cell A1 is a 5 Digit number I want to lookup on Sheet 2
Range
A2:A1000 and then delete the entire row corresponding to the number.


RowToDelete = Sheets("Sheet1").Cells(1, "A")

Sheets("Sheet2").Cells(RowToDelete, 1).EntireRow.Delet

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 12:14 PM.

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