Function Grand(plage As Range)
Dim v1, v2, i&, a&(1 To 2)
v1 = Application.Large(plage, 1) 'GRANDE.VALEUR
v2 = Application.Large(plage, 2)
For i = 1 To plage.Count
If a(1) = 0 And plage(i) = v1 Then
a(1) = i
ElseIf a(2) = 0 And plage(i) = v2 Then
a(2) = i
End If
If a(1) * a(2) Then Exit For
Next
Grand = a 'vecteur horizontal
End Function
Function Petit(plage As Range)
Dim v1, v2, i&, a&(1 To 2)
v1 = Application.Small(plage, 1) 'PETITE.VALEUR
v2 = Application.Small(plage, 2)
For i = 1 To plage.Count
If a(1) = 0 And plage(i) = v1 Then
a(1) = i
ElseIf a(2) = 0 And plage(i) = v2 Then
a(2) = i
End If
If a(1) * a(2) Then Exit For
Next
Petit = a 'vecteur horizontal
End Function