Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub deleterows()
Dim rng As Range Dim i As Long Set rng = ActiveSheet.Range(Cells(1, "A"), Cells(Rows.Count, "A").End(xlUp)) 'Work backwards from bottom to top when deleting rows 'This will delete the row if cell value = 0 'change 0 to your needs With rng For i = .Rows.Count To 1 Step -1 If .Cells(i) = 0 Then .Cells(i).EntireRow.Delete End If Next i End With End Sub "ya" wrote: how to delete a row based on a condition |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete Rows based on condition | Excel Discussion (Misc queries) | |||
HOW CAN I DELETE A COLUMN BASED ON A CONDITION | Excel Programming | |||
Delete worksheet row based on condition | Excel Programming | |||
How to delete a data row based on a condition | New Users to Excel | |||
Delete Columns based on a condition | Excel Programming |