Private
Sub
FeiertagLoeschen()
Dim
i
As
Integer
, j
As
Integer
, tage
As
Integer
jahr = 2018
If
IstSchaltjahr(jahr) =
True
Then
tage = 366
Else
tage = 365
End
If
For
i = 3
To
(tage + 2)
j = 2
Do
While
(j <= 12)
If
Cells(i, j).Value =
"H"
Or
Cells(i, j).Value =
"K"
Or
Cells(i, j).Value =
"P"
Or
Cells(i, j).Value =
""
Then
j = j + 1
If
Cells(i, j).Value =
"H"
Or
Cells(i, j).Value =
"K"
Or
Cells(i, j).Value =
"P"
Or
Cells(i, j).Value =
""
Then
Else
Cells(i, j).clearContents
Cells(i, j - 1).clearContents
j = j + 1
End
If
Else
Cells(i, j).clearContents
j = j + 1
Do
While
(j <= 12)
Cells(i, j).clearContents
j = j + 1
Loop
End
If
Loop
Next
i
End
Sub