ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   find and delete (https://www.excelbanter.com/excel-programming/363787-find-delete.html)

enyaw

find and delete
 
How would i find the last row of information inputted from a form and delete
that row?

Charlie

find and delete
 
Try:

Dim LastRowOnSheet As Long

LastRowOnSheet = Sheets("Sheet1").UsedRange.Rows.Count +
Sheets("Sheet1").UsedRange.Row - 1
Sheets("Sheet1").Cells(LastRowOnSheet, 1).EntireRow.Delete

"enyaw" wrote:

How would i find the last row of information inputted from a form and delete
that row?


enyaw

find and delete
 
How do i get this to ignore the first row?

"Charlie" wrote:

Try:

Dim LastRowOnSheet As Long

LastRowOnSheet = Sheets("Sheet1").UsedRange.Rows.Count +
Sheets("Sheet1").UsedRange.Row - 1
Sheets("Sheet1").Cells(LastRowOnSheet, 1).EntireRow.Delete

"enyaw" wrote:

How would i find the last row of information inputted from a form and delete
that row?



All times are GMT +1. The time now is 06:19 AM.

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