Function STotal#(c As Range, colonnes As Range)
Dim i&
i = 2
If c = "T" Then
While c(i) <> "T" And c(i) <> ""
If c(i) <> "ST" Then STotal = STotal + _
Application.Sum(Intersect(c(i).EntireRow, colonnes))
i = i + 1
Wend
ElseIf c = "ST" Then
While c(i) <> "ST" And c(i) <> "T" And c(i) <> ""
STotal = STotal + Application.Sum(Intersect(c(i).EntireRow, colonnes))
i = i + 1
Wend
Else
STotal = Application.Sum(Intersect(c.EntireRow, colonnes))
End If
End Function