ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete Selected Records (https://www.excelbanter.com/excel-programming/386254-re-delete-selected-records.html)

Vergel Adriano

Delete Selected Records
 
maybe something like this:

Sub delete_zero()
Dim lRow As Long
For lRow = 100 To 1 Step -1
With ActiveSheet.Cells(lRow, 1)
If .Text = "0" Then .EntireRow.Delete
End With
Next lRow
End Sub

it will loop through the range A1:A100 going bottom to top.


--
Hope that helps.

Vergel Adriano


"Ian B" wrote:

Hi,

How do I delete an entire rows but only when column A = 0

Thanks


Ian




All times are GMT +1. The time now is 09:41 AM.

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