Function NbJours(deb As Range, fin As Range, debexclu As Range, finexclu As Range, Optional ferie As Range)
Dim dat As Date, test As Boolean
For dat = deb To fin
test = Weekday(dat, 2) < 6
If test Then If Not ferie Is Nothing Then test = Application.CountIf(ferie, dat) = 0
If test Then test = dat < debexclu Or dat > finexclu
If test Then NbJours = NbJours + 1
Next
End Function