faster
03.05.2011 15:54:33
CitizenX
Hallo,
Die Startzeile musst Du noch anpassen (siehe Kommentar im Code)
Option Explicit
Sub löschen()
Dim lngLast As Long
Dim lngStart As Long
Dim i As Long
Dim n As Variant
Dim Bereich1 As Range
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
On Error GoTo ErrH
With Sheets("Tabelle1")
Set Bereich1 = .Columns("B:AJ") 'ggf anpassen
lngStart = 5 ' Startzeile bitte anpassen
lngLast = .Cells.Find(What:="*", After:=.Range("A1"), _
SearchOrder:=xlByRows, Searchdirection:=xlPrevious).Row
For i = lngLast To lngStart Step -1
n = Application.Match(0, Bereich1.Range(.Cells(i, 1), Cells(i, Bereich1.Columns.Count)), _
0)
If Not IsError(n) Then
.Rows(i).Delete
End If
Next
End With
ErrH:
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
Grüße
Steffen