matt68
Super member
Sub Main()
Dim ru(5),ru1(5),ru2(5),ru3(1),ru4(1),n(3),n1(3),ps(3),ps1(3)
ps(2) = 0.85
ps(3) = 0.15
ps1(3) = 5
rr = 6
rr1 = 12
rr2 = 11
ru(5) = rr
ru1(5) = rr1
ru2(5) = rr2
ru3(1) = rr22
ru4(1) = rr23
For es = 10181 To EstrazioneFin
r = 5
rB = 1
rV = 10
rP = 7
If IndiceMensile(es) = 11 Then
If Mese(es) < 1 Then
If Mese(es) = 1 Then
Scrivi
Scrivi String(90,"*")
Scrivi "Formazione del 1° terno"
End If
n(1) = Fuori90(Estratto(es,6,1) + 0)
n(2) = Fuori90(Estratto(es,6,2) + 0)
n(3) = Fuori90(Estratto(es,6,2) + 0)
n(4) = Fuori90(Estratto(es,6,2) + 0)
n(5) = Fuori90(Estratto(es,6,2) + 0)
OrdinaMatrice n,1
If n(1) = n(2)Then n(2) = Fuori90(n(2) + 1)
If n(2) = n(3)Then n(3) = Fuori90(n(3) + 1)
n1(1) = Fuori90(Estratto(es,r,3) + 89)
n1(2) = Fuori90(Estratto(es,r,5) + 77)
n1(3) = Fuori90(Estratto(es,r,4) + 34)
OrdinaMatrice n1,1
If n1(1) = n1(2)Then n1(2) = Fuori90(n1(2) + 1)
If n1(2) = n1(3)Then n1(3) = Fuori90(n1(3) + 1)
m = Mese(es)
Scrivi
ColoreTesto 2
Scrivi MeseNome(m),1
ColoreTesto 0
If Mese(es) = 1 Then Scrivi SiglaRuota(6) & " " & StringaEstratti(es,6)
If Mese(es) = 2 Then Scrivi SiglaRuota(6) & " " & StringaEstratti(es,6)
ImpostaGiocata 1,n,ru,ps,13,3
ImpostaGiocata 2,n,ru1,ps,13,3
ImpostaGiocata 3,n,ru2,ps1,13,3
ImpostaGiocata 4,n1,ru,ps,13,3
ImpostaGiocata 5,n1,ru1,ps,13,3
ImpostaGiocata 6,n1,ru2,ps1,13,3
Gioca es
Else
If Mese(es) > 2 And Mese(es) < 5 Then
If Mese(es) = 3 Then
Scrivi
Scrivi String(90,"*")
Scrivi "Formazione del 1° terno"
End If
n(1) = Fuori90(Estratto(es,r,1) + 0)
n(2) = Fuori90(Estratto(es,r,2) + 0)
n(3) = Fuori90(Estratto(es,r,2) + 0)
OrdinaMatrice n,1
If n(1) = n(2)Then n(2) = Fuori90(n(2) + 1)
If n(2) = n(3)Then n(3) = Fuori90(n(3) + 1)
n1(1) = Fuori90(Estratto(es,r,1) + 0)
n1(2) = Fuori90(Estratto(es,r,3) + 0)
n1(3) = Fuori90(Estratto(es,rV,5) + 0)
OrdinaMatrice n1,1
If n1(1) = n1(2)Then n1(2) = Fuori90(n1(2) + 1)
If n1(2) = n1(3)Then n1(3) = Fuori90(n1(3) + 1)
m = Mese(es)
Scrivi
ColoreTesto 2
Scrivi MeseNome(m),1
ColoreTesto 0
If Mese(es) = 3 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5)
If Mese(es) = 4 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5)
ImpostaGiocata 1,n,ru,ps,13,3
ImpostaGiocata 2,n,ru1,ps,13,3
ImpostaGiocata 3,n,ru2,ps1,13,3
ImpostaGiocata 4,n1,ru,ps,13,3
ImpostaGiocata 5,n1,ru1,ps,13,3
ImpostaGiocata 6,n1,ru2,ps1,13,3
Gioca es
Else
If Mese(es) > 4 And Mese(es) < 7 Then
If Mese(es) = 5 Then
Scrivi
Scrivi String(90,"*")
Scrivi "Formazione del 1° terno"
End If
n(1) = Fuori90(Estratto(es,r,1) + 0)
n(2) = Fuori90(Estratto(es,r,5) + 0)
n(3) = Fuori90(Estratto(es,r,5) + 0)
OrdinaMatrice n,1
If n(1) = n(2)Then n(2) = Fuori90(n(2) + 1)
If n(2) = n(3)Then n(3) = Fuori90(n(3) + 1)
n1(1) = Fuori90(Estratto(es,r,1) + 0)
n1(2) = Fuori90(Estratto(es,r,2) + 0)
n1(3) = Fuori90(Estratto(es,R,3) + 0)
OrdinaMatrice n1,1
If n1(1) = n1(2)Then n1(2) = Fuori90(n1(2) + 1)
If n1(2) = n1(3)Then n1(3) = Fuori90(n1(3) + 1)
m = Mese(es)
Scrivi
ColoreTesto 2
Scrivi MeseNome(m),1
ColoreTesto 0
If Mese(es) = 5 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5) & " " & SiglaRuota(5) & " " & StringaEstratti(es,5)
If Mese(es) = 6 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5) & " " & SiglaRuota(5) & " " & StringaEstratti(es,5)
ImpostaGiocata 1,n,ru,ps,13,3
ImpostaGiocata 2,n,ru1,ps,13,3
ImpostaGiocata 3,n,ru2,ps1,13,3
ImpostaGiocata 4,n1,ru,ps,13,3
ImpostaGiocata 5,n1,ru1,ps,13,3
ImpostaGiocata 6,n1,ru2,ps1,13,3
Gioca es
Else
If Mese(es) > 6 And Mese(es) < 9 Then
If Mese(es) = 7 Then
Scrivi
Scrivi String(90,"*")
Scrivi "Formazione del 1° terno"
End If
n(1) = Fuori90(Estratto(es,r,1) + 0)
n(2) = Fuori90(Estratto(es,r,5) + 0)
n(3) = Fuori90(Estratto(es,r,5) + 0)
OrdinaMatrice n,1
If n(1) = n(2)Then n(2) = Fuori90(n(2) + 1)
If n(2) = n(3)Then n(3) = Fuori90(n(3) + 1)
n1(1) = Fuori90(Estratto(es,r,2) + 0)
n1(2) = Fuori90(Estratto(es,r,4) + 0)
n1(3) = Fuori90(Estratto(es,r,2) + 0)
OrdinaMatrice n1,1
If n1(1) = n1(2)Then n1(2) = Fuori90(n1(2) + 1)
If n1(2) = n1(3)Then n1(3) = Fuori90(n1(3) + 1)
m = Mese(es)
Scrivi
ColoreTesto 2
Scrivi MeseNome(m),1
ColoreTesto 0
If Mese(es) = 7 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5)
If Mese(es) = 8 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5)
ImpostaGiocata 1,n,ru,ps,13,3
ImpostaGiocata 2,n,ru1,ps,13,3
ImpostaGiocata 3,n,ru2,ps1,13,3
ImpostaGiocata 4,n1,ru,ps,13,3
ImpostaGiocata 5,n1,ru1,ps,13,3
ImpostaGiocata 6,n1,ru2,ps1,13,3
Gioca es
Else
If Mese(es) > 8 And Mese(es) < 11 Then
If Mese(es) = 9 Then
Scrivi
Scrivi String(90,"*")
Scrivi "Formazione del 1° terno"
Scrivi "1°numero: 1° Estratto di Bari + 0"
Scrivi "2°numero : 2°estratto di Bari + 0"
Scrivi "3°numero : 5°estratto di Venezia + 0"
Scrivi "Formazione del 2°Terno"
Scrivi "1°numero: 1° Estratto di Bari + 0"
Scrivi "2°numero : 4°estratto di Bari + 0"
Scrivi "3°numero : 4°estratto di Bari + 0"
End If
n(1) = Fuori90(Estratto(es,r,1) + 18)
n(2) = Fuori90(Estratto(es,r,1) + 57)
n(3) = Fuori90(Estratto(es,R,1) + 87)
OrdinaMatrice n,1
If n(1) = n(2)Then n(2) = Fuori90(n(2) + 1)
If n(2) = n(3)Then n(3) = Fuori90(n(3) + 1)
n1(1) = Fuori90(Estratto(es,rP,4) + 0)
n1(2) = Fuori90(Estratto(es,rP,4) + 0)
n1(3) = Fuori90(Estratto(es,rP,4) + 0)
OrdinaMatrice n1,1
If n1(1) = n1(2)Then n1(2) = Fuori90(n1(2) + 1)
If n1(2) = n1(3)Then n1(3) = Fuori90(n1(3) + 1)
m = Mese(es)
Scrivi
ColoreTesto 2
Scrivi MeseNome(m),1
ColoreTesto 0
If Mese(es) = 9 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5) & " " & SiglaRuota(5) & " " & StringaEstratti(es,5)
If Mese(es) = 10 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5) & " " & SiglaRuota(5) & " " & StringaEstratti(es,5)
ImpostaGiocata 1,n,ru,ps,13,3
ImpostaGiocata 2,n,ru1,ps,13,3
ImpostaGiocata 3,n,ru2,ps1,13,3
ImpostaGiocata 4,n1,ru,ps,13,3
ImpostaGiocata 5,n1,ru1,ps,13,3
ImpostaGiocata 6,n1,ru2,ps1,13,3
Gioca es
Else
If Mese(es) > 10 And Mese(es) < 13 Then
If Mese(es) = 11 Then
Scrivi
Scrivi String(90,"*")
Scrivi "Formazione del 1° terno"
Scrivi "3°numero : 1°estratto di Bari + 0"
End If
n(1) = Fuori90(Estratto(es,r,2) + 0)
n(2) = Fuori90(Estratto(es,r,2) + 0)
n(3) = Fuori90(Estratto(es,r,2) + 0)
OrdinaMatrice n,1
If n(1) = n(2)Then n(2) = Fuori90(n(2) + 1)
If n(2) = n(3)Then n(3) = Fuori90(n(3) + 1)
n1(1) = Fuori90(Estratto(es,r,2) + 9)
n1(2) = Fuori90(Estratto(es,r,2) + 9 + 20)
n1(3) = Fuori90(Estratto(es,rB,3) + 38)
OrdinaMatrice n1,1
If n1(1) = n1(2)Then n1(2) = Fuori90(n1(2) + 1)
If n1(2) = n1(3)Then n1(3) = Fuori90(n1(3) + 1)
m = Mese(es)
Scrivi
ColoreTesto 2
Scrivi MeseNome(m),1
ColoreTesto 0
If Mese(es) = 11 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5)
If Mese(es) = 12 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5)
ImpostaGiocata 1,n,ru,ps,13,3
ImpostaGiocata 2,n,ru1,ps,13,3
ImpostaGiocata 3,n,ru2,ps1,13,3
ImpostaGiocata 4,n1,ru,ps,13,3
ImpostaGiocata 5,n1,ru1,ps,13,3
ImpostaGiocata 6,n1,ru2,ps1,13,3
Gioca es
End If
End If
End If
End If
End If
End If
End If
Next
ScriviResoconto
End Sub
deve funzionare qualcosa non va
ad ogni 11 ma estrazione dee fare dei calcoli ogni mese diversi gennaio,febbraio,ecc
chi mi aiuta
Dim ru(5),ru1(5),ru2(5),ru3(1),ru4(1),n(3),n1(3),ps(3),ps1(3)
ps(2) = 0.85
ps(3) = 0.15
ps1(3) = 5
rr = 6
rr1 = 12
rr2 = 11
ru(5) = rr
ru1(5) = rr1
ru2(5) = rr2
ru3(1) = rr22
ru4(1) = rr23
For es = 10181 To EstrazioneFin
r = 5
rB = 1
rV = 10
rP = 7
If IndiceMensile(es) = 11 Then
If Mese(es) < 1 Then
If Mese(es) = 1 Then
Scrivi
Scrivi String(90,"*")
Scrivi "Formazione del 1° terno"
End If
n(1) = Fuori90(Estratto(es,6,1) + 0)
n(2) = Fuori90(Estratto(es,6,2) + 0)
n(3) = Fuori90(Estratto(es,6,2) + 0)
n(4) = Fuori90(Estratto(es,6,2) + 0)
n(5) = Fuori90(Estratto(es,6,2) + 0)
OrdinaMatrice n,1
If n(1) = n(2)Then n(2) = Fuori90(n(2) + 1)
If n(2) = n(3)Then n(3) = Fuori90(n(3) + 1)
n1(1) = Fuori90(Estratto(es,r,3) + 89)
n1(2) = Fuori90(Estratto(es,r,5) + 77)
n1(3) = Fuori90(Estratto(es,r,4) + 34)
OrdinaMatrice n1,1
If n1(1) = n1(2)Then n1(2) = Fuori90(n1(2) + 1)
If n1(2) = n1(3)Then n1(3) = Fuori90(n1(3) + 1)
m = Mese(es)
Scrivi
ColoreTesto 2
Scrivi MeseNome(m),1
ColoreTesto 0
If Mese(es) = 1 Then Scrivi SiglaRuota(6) & " " & StringaEstratti(es,6)
If Mese(es) = 2 Then Scrivi SiglaRuota(6) & " " & StringaEstratti(es,6)
ImpostaGiocata 1,n,ru,ps,13,3
ImpostaGiocata 2,n,ru1,ps,13,3
ImpostaGiocata 3,n,ru2,ps1,13,3
ImpostaGiocata 4,n1,ru,ps,13,3
ImpostaGiocata 5,n1,ru1,ps,13,3
ImpostaGiocata 6,n1,ru2,ps1,13,3
Gioca es
Else
If Mese(es) > 2 And Mese(es) < 5 Then
If Mese(es) = 3 Then
Scrivi
Scrivi String(90,"*")
Scrivi "Formazione del 1° terno"
End If
n(1) = Fuori90(Estratto(es,r,1) + 0)
n(2) = Fuori90(Estratto(es,r,2) + 0)
n(3) = Fuori90(Estratto(es,r,2) + 0)
OrdinaMatrice n,1
If n(1) = n(2)Then n(2) = Fuori90(n(2) + 1)
If n(2) = n(3)Then n(3) = Fuori90(n(3) + 1)
n1(1) = Fuori90(Estratto(es,r,1) + 0)
n1(2) = Fuori90(Estratto(es,r,3) + 0)
n1(3) = Fuori90(Estratto(es,rV,5) + 0)
OrdinaMatrice n1,1
If n1(1) = n1(2)Then n1(2) = Fuori90(n1(2) + 1)
If n1(2) = n1(3)Then n1(3) = Fuori90(n1(3) + 1)
m = Mese(es)
Scrivi
ColoreTesto 2
Scrivi MeseNome(m),1
ColoreTesto 0
If Mese(es) = 3 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5)
If Mese(es) = 4 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5)
ImpostaGiocata 1,n,ru,ps,13,3
ImpostaGiocata 2,n,ru1,ps,13,3
ImpostaGiocata 3,n,ru2,ps1,13,3
ImpostaGiocata 4,n1,ru,ps,13,3
ImpostaGiocata 5,n1,ru1,ps,13,3
ImpostaGiocata 6,n1,ru2,ps1,13,3
Gioca es
Else
If Mese(es) > 4 And Mese(es) < 7 Then
If Mese(es) = 5 Then
Scrivi
Scrivi String(90,"*")
Scrivi "Formazione del 1° terno"
End If
n(1) = Fuori90(Estratto(es,r,1) + 0)
n(2) = Fuori90(Estratto(es,r,5) + 0)
n(3) = Fuori90(Estratto(es,r,5) + 0)
OrdinaMatrice n,1
If n(1) = n(2)Then n(2) = Fuori90(n(2) + 1)
If n(2) = n(3)Then n(3) = Fuori90(n(3) + 1)
n1(1) = Fuori90(Estratto(es,r,1) + 0)
n1(2) = Fuori90(Estratto(es,r,2) + 0)
n1(3) = Fuori90(Estratto(es,R,3) + 0)
OrdinaMatrice n1,1
If n1(1) = n1(2)Then n1(2) = Fuori90(n1(2) + 1)
If n1(2) = n1(3)Then n1(3) = Fuori90(n1(3) + 1)
m = Mese(es)
Scrivi
ColoreTesto 2
Scrivi MeseNome(m),1
ColoreTesto 0
If Mese(es) = 5 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5) & " " & SiglaRuota(5) & " " & StringaEstratti(es,5)
If Mese(es) = 6 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5) & " " & SiglaRuota(5) & " " & StringaEstratti(es,5)
ImpostaGiocata 1,n,ru,ps,13,3
ImpostaGiocata 2,n,ru1,ps,13,3
ImpostaGiocata 3,n,ru2,ps1,13,3
ImpostaGiocata 4,n1,ru,ps,13,3
ImpostaGiocata 5,n1,ru1,ps,13,3
ImpostaGiocata 6,n1,ru2,ps1,13,3
Gioca es
Else
If Mese(es) > 6 And Mese(es) < 9 Then
If Mese(es) = 7 Then
Scrivi
Scrivi String(90,"*")
Scrivi "Formazione del 1° terno"
End If
n(1) = Fuori90(Estratto(es,r,1) + 0)
n(2) = Fuori90(Estratto(es,r,5) + 0)
n(3) = Fuori90(Estratto(es,r,5) + 0)
OrdinaMatrice n,1
If n(1) = n(2)Then n(2) = Fuori90(n(2) + 1)
If n(2) = n(3)Then n(3) = Fuori90(n(3) + 1)
n1(1) = Fuori90(Estratto(es,r,2) + 0)
n1(2) = Fuori90(Estratto(es,r,4) + 0)
n1(3) = Fuori90(Estratto(es,r,2) + 0)
OrdinaMatrice n1,1
If n1(1) = n1(2)Then n1(2) = Fuori90(n1(2) + 1)
If n1(2) = n1(3)Then n1(3) = Fuori90(n1(3) + 1)
m = Mese(es)
Scrivi
ColoreTesto 2
Scrivi MeseNome(m),1
ColoreTesto 0
If Mese(es) = 7 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5)
If Mese(es) = 8 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5)
ImpostaGiocata 1,n,ru,ps,13,3
ImpostaGiocata 2,n,ru1,ps,13,3
ImpostaGiocata 3,n,ru2,ps1,13,3
ImpostaGiocata 4,n1,ru,ps,13,3
ImpostaGiocata 5,n1,ru1,ps,13,3
ImpostaGiocata 6,n1,ru2,ps1,13,3
Gioca es
Else
If Mese(es) > 8 And Mese(es) < 11 Then
If Mese(es) = 9 Then
Scrivi
Scrivi String(90,"*")
Scrivi "Formazione del 1° terno"
Scrivi "1°numero: 1° Estratto di Bari + 0"
Scrivi "2°numero : 2°estratto di Bari + 0"
Scrivi "3°numero : 5°estratto di Venezia + 0"
Scrivi "Formazione del 2°Terno"
Scrivi "1°numero: 1° Estratto di Bari + 0"
Scrivi "2°numero : 4°estratto di Bari + 0"
Scrivi "3°numero : 4°estratto di Bari + 0"
End If
n(1) = Fuori90(Estratto(es,r,1) + 18)
n(2) = Fuori90(Estratto(es,r,1) + 57)
n(3) = Fuori90(Estratto(es,R,1) + 87)
OrdinaMatrice n,1
If n(1) = n(2)Then n(2) = Fuori90(n(2) + 1)
If n(2) = n(3)Then n(3) = Fuori90(n(3) + 1)
n1(1) = Fuori90(Estratto(es,rP,4) + 0)
n1(2) = Fuori90(Estratto(es,rP,4) + 0)
n1(3) = Fuori90(Estratto(es,rP,4) + 0)
OrdinaMatrice n1,1
If n1(1) = n1(2)Then n1(2) = Fuori90(n1(2) + 1)
If n1(2) = n1(3)Then n1(3) = Fuori90(n1(3) + 1)
m = Mese(es)
Scrivi
ColoreTesto 2
Scrivi MeseNome(m),1
ColoreTesto 0
If Mese(es) = 9 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5) & " " & SiglaRuota(5) & " " & StringaEstratti(es,5)
If Mese(es) = 10 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5) & " " & SiglaRuota(5) & " " & StringaEstratti(es,5)
ImpostaGiocata 1,n,ru,ps,13,3
ImpostaGiocata 2,n,ru1,ps,13,3
ImpostaGiocata 3,n,ru2,ps1,13,3
ImpostaGiocata 4,n1,ru,ps,13,3
ImpostaGiocata 5,n1,ru1,ps,13,3
ImpostaGiocata 6,n1,ru2,ps1,13,3
Gioca es
Else
If Mese(es) > 10 And Mese(es) < 13 Then
If Mese(es) = 11 Then
Scrivi
Scrivi String(90,"*")
Scrivi "Formazione del 1° terno"
Scrivi "3°numero : 1°estratto di Bari + 0"
End If
n(1) = Fuori90(Estratto(es,r,2) + 0)
n(2) = Fuori90(Estratto(es,r,2) + 0)
n(3) = Fuori90(Estratto(es,r,2) + 0)
OrdinaMatrice n,1
If n(1) = n(2)Then n(2) = Fuori90(n(2) + 1)
If n(2) = n(3)Then n(3) = Fuori90(n(3) + 1)
n1(1) = Fuori90(Estratto(es,r,2) + 9)
n1(2) = Fuori90(Estratto(es,r,2) + 9 + 20)
n1(3) = Fuori90(Estratto(es,rB,3) + 38)
OrdinaMatrice n1,1
If n1(1) = n1(2)Then n1(2) = Fuori90(n1(2) + 1)
If n1(2) = n1(3)Then n1(3) = Fuori90(n1(3) + 1)
m = Mese(es)
Scrivi
ColoreTesto 2
Scrivi MeseNome(m),1
ColoreTesto 0
If Mese(es) = 11 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5)
If Mese(es) = 12 Then Scrivi SiglaRuota(5) & " " & StringaEstratti(es,5)
ImpostaGiocata 1,n,ru,ps,13,3
ImpostaGiocata 2,n,ru1,ps,13,3
ImpostaGiocata 3,n,ru2,ps1,13,3
ImpostaGiocata 4,n1,ru,ps,13,3
ImpostaGiocata 5,n1,ru1,ps,13,3
ImpostaGiocata 6,n1,ru2,ps1,13,3
Gioca es
End If
End If
End If
End If
End If
End If
End If
Next
ScriviResoconto
End Sub
deve funzionare qualcosa non va
ad ogni 11 ma estrazione dee fare dei calcoli ogni mese diversi gennaio,febbraio,ecc
chi mi aiuta