Bonjour,
En attendant la proposition de Curulis57, essayez celle-ci (tout en conservant une partie de qu'il avait fait)
On utilise une colonne supplémentaire AW que vous pouvez masquer et on y applique la fonction personnalisée suivante en bout de ligne: =HeureSup()
puis pour la somme en AO76: =SOMME.SI($A$5:$A$70;$B76;$AW$5:$AW$70)
la fonction personnalisée:
Public Function HeureSup() As Double
Dim rCel1 As Range, iRow%, iIdx%
Dim TotSup As Double
Application.Volatile
iRow = Application.Caller.Row
With Worksheets(Application.Caller.Parent.Name)
For x = 2 To 43
If .Cells(iRow, x) <> "" And IsNumeric(.Cells(iRow, x)) And Cells(iRow, x).Interior.Color = RGB(255, 0, 0) Then
TotSup = TotSup + .Cells(iRow, x) * 1
End If
Next
End With
HeureSup = TotSup
End Function
le fichier
Cdlt