Function COUT(t As Variant, an As Byte) As Double
If Application.CountA(t) = 1 Then COUT = t: Exit Function
Dim ub As Byte, i As Long, n As Byte, j As Byte
t = t 'matrice, plus rapide
ub = UBound(t, 2)
For i = 1 To UBound(t)
n = 0
For j = 1 To ub
If n = 0 Then If t(i, j) <> "" Then n = 1
If n Then
If n = an Then COUT = COUT + t(i, j): Exit For
n = n + 1
End If
Next
Next
End Function