Function FonctionLot(ByVal QLot1 As Integer, ByVal QLot2 As Integer, QLot3 As Integer, ByVal QFormule As Integer, ByVal Chaine As String) As String
' SI QTE LOT 1 >= QUANTITE FORMULE alors RESULTAT = LOT 1
' SI QTE LOT 1 < QUANTITE FORMULE alors RESULTAT = LOT 1 LOT 2
' SI QTE LOT 1 = 0 ET QTE LOT 2 >= QUANTITE FORMULE alors RESULTAT = LOT 2
' SI QTE LOT 2 < QUANTITE FORMULE alors RESULTAT = LOT 2 LOT 3
' SI QTE LOT 1 = 0 ET QTE LOT 2 = 0 ET QTE LOT3 <> QUANTITE FORMULE alors RESULTAT = LOT 3
FonctionLot = ""
If QLot1 >= QFormule Then FonctionLot = UCase(Chaine) & " 1": Exit Function
If QLot1 < QFormule And QLot1 > 0 Then FonctionLot = UCase(Chaine) & " 1 " & UCase(Chaine) & " 2": Exit Function...