Public Function NBJourCouleur(plage As Range)
Dim c As Range
Dim c1 As Range
Dim cpt As Integer
Dim tot As Double, x As Double
Application.Volatile
cpt = 0
For Each c In plage
Set c1 = c.Offset(0, 1)
If c1.Interior.ColorIndex = 48 And c.Value <> "" And c1.Value <> "" Then
cpt = cpt + 1
x = WorksheetFunction.NetworkDays(c, c1)
tot = tot + x
End If
Next c
If cpt <> 0 Then NBJourCouleur = tot / cpt
End Function