Function NBJourOuvreMois(xPlageDates As Range, xJoursFeries As Range, xMois&) As Long
Dim dicoPlage As New Dictionary, dicoFerie As New Dictionary
Dim i&, i0&, i1&, xc As Range, xlig As Range
For Each xc In xJoursFeries: dicoFerie.Add xc.Value, "": Next xc
For Each xlig In xPlageDates.Rows
i0 = xlig.Cells(1, 1)
i1 = xlig.Cells(1, 2)
For i = i0 To i1
If i > 1 Then
If Not (Weekday(i) = vbSunday Or Weekday(i) = vbSaturday) Then
If Month(i) = xMois Then
If Not dicoFerie.Exists(i) Then
dicoPlage(Month(i)) = dicoPlage(Month(i)) + 1
End If
End If
End If
End If
Next i
Next xlig
If dicoPlage.Exists(xMois) Then NBJourOuvreMois = dicoPlage(xMois)
End Function