Sub
Teilwert()
Dim
Sh
As
Worksheet, Rng
As
Range, c
As
Range, x
As
Long
Const
C_R
As
String
=
"Rechnung"
Const
C_T
As
String
=
"Teilwert"
Set
Sh = ActiveSheet:
With
Sh.UsedRange
Set
c = .Find(C_R, .Cells(1), xlValues, xlWhole, , xlPrevious)
If
c
Is
Nothing
Then
Exit
Sub
Set
Rng = Range(.Cells(1), c)
With
Rng
For
x = .Cells(.Cells.Count).Row
To
.Cells(1).Row
Step
-1
If
.Cells(x).Value = C_T
Then
.Cells(x).EntireRow.Delete
Next
x
End
With
End
With
End
Sub