Sub
Delete()
Dim
VN_Name
Dim
VName
As
String
Dim
NName
As
String
Dim
c
As
Range, i
As
Integer
Application.ScreenUpdating =
False
VN_Name = InputBox(
"Bitte Vor- und Nachname eingeben"
,
Default
:=
"Hans Meier"
)
VName = Split(VN_Name)(0)
NName = Split(VN_Name)(1)
For
i = 1
To
Worksheets.Count
Worksheets(i).Activate
For
Each
c
In
ActiveSheet.Range(
"C:C"
).SpecialCells(xlTextValues)
If
c.Value = NName
And
c.Offset(0, 1).Value = VName
Then
c.EntireRow.Cells.SpecialCells(xlCellTypeConstants).ClearContents
Exit
For
End
If
Next
Next
i
Application.ScreenUpdating =
True
MsgBox(
"Name wurde gelöscht"
)
End
Sub