Private Sub CommandButton1_Click()
For i = Range("AG6") To Range("AG7")
Range("AG5") = i
Do
[L11:Z11] = 0
For Each cel In [L11:Z11]
cel.Value = Int(Rnd() * 50 - 50)
If [AD11] < 0.85 Then GoTo a
Next
a:
Loop While [AD11] < 0.85
ActiveSheet.PageSetup.PrintArea = "A1:AD20"
ActiveSheet.PrintOut
Next