For
Each
col
In
rng.Columns
With
wks
If
Not
Weekday(.Cells(6, col.column).Value, vbMonday) > 5
And
IsError(IsHoliday(.Cells(6, col.column).Value)
If
col.Cells.Count = Application.WorksheetFunction.CountBlank(col)
Then
MSGBOX
"Volle Verfügbarkeit am "
& .Cells(5, col.column) &
", den "
& .Cells(6, col.column)
Exit
Sub
End
If
End
If
End
With
Next
MSGBOX
"Es gibt keine komplett leere Spalte in der Ressourcenplanung"
End
Sub
Function
IsHoliday(d
As
Date
)
As
Variant
Dim
v
As
Variant
v = Application.Match(
CDbl
(d), ThisWorkbook.Worksheets(
"Public Holidays"
).Columns(1), 0)
IsHoliday = v
End
Function