Function Heures(P As Range, Q As Range, toto As Byte)
'P et Q sont 2 vecteurs de même dimension
Dim i&, a, b(1)
For i = 1 To P.Count
Select Case toto
Case 1: a = TOTO1(P(i), Q(i))
Case 2: a = TOTO2(P(i), Q(i))
Case 3: a = TOTO3(P(i), Q(i))
End Select
b(0) = b(0) + a(0)
b(1) = b(1) + a(1)
Next
Heures = Application.Transpose(b) 'vecteur colonne
End Function