Function Minutes(deb As Date, fin As Date) As Long
Dim Feries, t1 As Date, t2 As Date, n As Long, d As Date, t As Date, dat As Long, test As Boolean
[COLOR="Red"]Feries = Array(CDbl(CDate("1/1/10")), CDbl(CDate("1/5/10")), CDbl(CDate("14/7/10")), CDbl(CDate("15/8/10")), CDbl(CDate("25/12/10")))[/COLOR]
t1 = TimeValue("8:0")
t2 = TimeValue("18:0")
For n = 1 To DateDiff("n", deb, fin)
d = deb + n / 1440
t = TimeValue(d)
If Int(CDec(d)) > dat Then
dat = Int(CDec(d))
test = Weekday(d, 2) < 6 And IsError(Application.Match(dat, [COLOR="red"]Feries[/COLOR], 0))
End If
If t > t1 And t <= t2 And test Then Minutes = Minutes + 1
Next
End Function