you may try this:
' arnelgp Sub agpDeleteZeroRow() ' put the name of sheet to work here Const SHEET_NAME As String = "Sheet1" Dim iX As Long, value As Double iX = 8 With Worksheets(SHEET_NAME) value = NZ(.Range("D" & iX), -1) Do While value > -1 If value = 0 Then .Rows(iX & ":" & iX).Select Selection.Delete Shift:=xlUp Else iX = iX + 1 End If value = NZ(.Range("D" & iX), -1) Loop End With End Sub Private Function NZ(ByVal value1 As Variant, value2 As Variant) As Variant Dim s As String s = Trim$(value1 & "") NZ = value1 If Len(s) < 1 Then NZ = value2 End If End Function




Reply With Quote