Public
Sub
bedingte_Zeilenloeschung()
Worksheets(
"Ausarbeitung"
).Unprotect Password:=
"AAA"
Worksheets(
"Kalkulation"
).Unprotect Password:=
"AAA"
DoDeleteCells Worksheets(
"Kalkulation"
)
DoDeleteCells Worksheets(
"Ausarbeitung"
)
Worksheets(
"Ausarbeitung"
).Protect Password:=
"AAA"
Worksheets(
"Kalkulation"
).Protect Password:=
"AAA"
End
Sub
Private
Sub
DoDeleteCells(sh
As
Worksheet)
Dim
lz
As
Long
, t
As
Long
With
sh
lz = .Cells(Rows.Count, 1).
End
(xlUp).Rows.Row
For
t = lz
To
2
Step
-1
If
.Cells(t, 1).Value =
"x"
Then
.Rows(t).Delete Shift:=xlUp
End
If
Next
t
End
With
End
Sub