Ok then no probs,
try this,
Sub deleteRows()
Dim delCount, count As Integer
count = Application.WorksheetFunction.CountIf(Range("D:D"), 99) + _
Application.WorksheetFunction.CountBlank(Range("D:D"))
Dim cl As Range
StartDeleting:
For Each cl In Range("D:D")
If cl.Value = 99 Then
cl.EntireRow.delete
delCount = delCount + 1
ElseIf cl.Value = "" Then
cl.EntireRow.delete
delCount = delCount + 1
End If
Next cl
If delCount <> count Then GoTo StartDeleting
'Now start to delete from col F
Dim cl2 As Range
Dim delCount2, count2 As Integer
count2 = Application.WorksheetFunction.CountIf(Range("F:F"), 0)
StartDeleting2:
For Each cl2 In Range("F:F")
If cl2.Value = 0 Then
cl2.EntireRow.delete
delCount2 = delCount2 + 1
ElseIf cl2.Value = "" Then
cl2.EntireRow.delete
delCount2 = delCount2 + 1
End If
Next cl2
If delCount2 <> count2 Then GoTo StartDeleting2
End Sub
i have just tacked the col F deleting on the end and put the if Blank delete in the origanl part
Bookmarks