Sub aleaML1_20_corrigée()
nb = Range("AY65536").End(xlUp).Row
If Range("AY6").HasFormula Then
Range("AY6:AY" & nb).Copy
Range("AY6").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Else
formule = "=SI(ET($A6<>"""";$F6<>"""";$C6=$AY$1;$O6<>""0. Pas de sortie positive"";$AO6=""non"");ALEA();0)"
[AY6].FormulaLocal = formule
Range("AY6:AY" & nb).FillDown
End If
End Sub