Sub Test()
Dim Anzahl As Long
'Anzahl = ...
Dim wks As Excel.Worksheet
Dim i As Long
Set wks = Worksheets("Sheet1")
For i = Anzahl To 1 Step -1
If DeleteCondition(wks, i) Then
Debug.Print "Deleting row " & Format$(i, "00")
Call wks.Rows(i).Delete(xlShiftUp)
End If
Next
End Sub
Private Function DeleteCondition(Worksheet As Excel.Worksheet, RowIndex As Long) As Boolean
With Worksheet
DeleteCondition = .Cells(RowIndex, "G").Value = 1 _
And .Cells(RowIndex, "V").Value = 0
End With
End Function
|