Hi
that is what i have now
For the workingdays
The month january have Range("B5:F10")
the month February have range ("B12:F17")
And the same for the weekend
january Weekend = Range("G5:H10")
Set february Weekend = Range("g12:H17")
Now i do it so
Set Rngjanurai = Range("B5:F10")
Set Rngfebruari = Range("B12:F17")
Set RngjanuariWeekend = Range("G5:H10")
Set RngfebruariWeekend = Range("g12:H17")
Select Case strTypeSelection
Case "Range"
Set RngVerlofBereik = Selection
Set RngMaandenWatched = Union(Rngjanurai, Rngfebruari, Rngmaart, Rngapril, Rngmei, Rngjuni, Rngjuli, Rngaugustus, Rngseptember, Rngoktober, Rngnovember, Rngdecember)
Set RngWeekendWatched = Union(RngjanuariWeekend, RngfebruariWeekend, RngmaartWeekend, RngaprilWeekend, RngmeiWeekend, RngjuniWeekend, RngjuliWeekend, RngaugustusWeekend, RngseptemberWeekend, RngoktoberWeekend, RngnovemberWeekend, RngdecemberWeekend)
Set RngIntersectMaanden = Intersect(RngVerlofBereik, RngMaandenWatched)
Set RngIntersectWeekenden = Intersect(RngVerlofBereik, RngWeekendWatched)
Can i do the same with a array for the working days and one for the weekens and do a intersection with a cell that the user have selected
Bookmarks