Function MinMaxPlusPetiteTwoLeft(rng As Range)
Dim T, I&
T = Application.Transpose(rng.Value)
For I = 1 To UBound(T): T(I) = IIf(Val(T(I)) = 0, 0, T(I)): Next
MinMaxPlusPetiteTwoLeft = WorksheetFunction.Small(T, 3)
End Function
Function MinMaxPlusGrandeTwoRight(rng As Range)
Dim T, I&
T = Application.Transpose(rng.Value)
For I = 1 To UBound(T): T(I) = IIf(Val(T(I)) = 0, 0, T(I)): Next
If WorksheetFunction.Small(T, UBound(T) - 3) = WorksheetFunction.Small(T, UBound(T) - 2) Then x = UBound(T) - 4 Else x = UBound(T) - 3
MinMaxPlusGrandeTwoRight = WorksheetFunction.Small(T, x)
End Function
'************************************************************************************
'sinon si on saute les doublons
Function MinMaxPlusPetiteTwoLeft2(rng As Range) 'saute le doublons
Dim T, I&
T = Application.Transpose(rng.Value)
For I = 1 To UBound(T): T(I) = IIf(Val(T(I)) = 0, 0, T(I)): Next
If WorksheetFunction.Small(T, 3) = WorksheetFunction.Small(T, 2) Then x = 4 Else x = 3
MinMaxPlusPetiteTwoLeft = WorksheetFunction.Small(T, 3)
End Function
Function MinMaxPlusGrandeTwoRight2(rng As Range) 'saute le doublon
Dim T, I&
T = Application.Transpose(rng.Value)
For I = 1 To UBound(T): T(I) = IIf(Val(T(I)) = 0, 0, T(I)): Next
MinMaxPlusGrandeTwoRight = WorksheetFunction.Small(T, UBound(T) - 3)
End Function