Function Fipat(Ligne%)
Dim T(1 To 6), i%, j%, N%
T(1) = Cells(Ligne, "Q"): T(2) = Cells(Ligne, "AD"): T(3) = Cells(Ligne, "AQ")
T(4) = Cells(Ligne, "BD"): T(5) = Cells(Ligne, "BQ"): T(6) = Cells(Ligne, "CD")
For i = 1 To 6
If T(i) < 0 Then
For j = 1 To i: T(j) = 0: Next j
End If
Next i
For i = 1 To 6
If T(i) > 0 Then N = N + 1
Next i
For i = 1 To 6: Fipat = Fipat + T(i): Next i
If N = 0 Then Fipat = "" Else Fipat = Fipat / N
End Function