Ti chiedo se possibile che faccia la ricerca della cinquina sopra all'interno di tutto l'archivio cioe' dal 07 /01 / 1871 e che il primo estratto della cinquina sopra deve essere il complemento a 90 della somma della cinquina sotto.
'IL TESORO NASCOSTO di Domenico Manna
Grazie infinite.
Sub main()
Dim rt(1),nu(1),pt(1)
Dim a,b,c,d,e,f,g,h,i,l,s1,s2,s1b,s1d,fl
pt(1)=1
clp=18
ini=7850
fin=EstrazioneFin
co=0
For es=ini To fin
Messaggio es
For r=1 To 11
If r=11 Then r=12
rt(1)=r
a=Estratto(es-1,r,1)
b=Estratto(es-1,r,2)
c=Estratto(es-1,r,3)
d=Estratto(es-1,r,4)
e=Estratto(es-1,r,5)
s1=Fuori90(SommaEstratti(es-1,r)) : s1b=Fuori90(s1*2) : s1d=Diametrale(s1b)
f=Estratto(es,r,1)
g=Estratto(es,r,2)
h=Estratto(es,r,3)
i=Estratto(es,r,4)
l=Estratto(es,r,5)
s2=Fuori90(SommaEstratti(es,r))
fl=Fuori90 (f+l)
If Pari (fl) Then
cond2=Fuori90((3*f)+(6*g)+(4*h)+(4*i)+(5*l))
If cond2=s1b Or cond2=s1d Then
eq1=Fuori90((3*s1)+s2+c+(2*d)+(3*e)+(3*f)+g+h+l)
If eq1=90 Then
co=co+1
byron=Fuori90(90+(s1-s2+a+f-g))
nu(1)=byron
Scrivi String (70,"=")&" Caso n°"& co,1
Scrivi DataEstrazione (es-1)&" "& SiglaRuota (r)&" "& StringaEstratti (es-1,r)&" somma estr. "& s1 &" (S1)"
Scrivi Space(14)&" a. b. c. d. e"
Scrivi DataEstrazione (es)&" "& SiglaRuota (r)&" "& StringaEstratti (es,r)&" somma estr. "& s2 &" (S2)"
Scrivi Space(14)&" f. g. h. i. l"
Scrivi "Prima condizione: F+L somma pari ("& Format2(f)&"+"& Format2(l)&"

"& fl
Scrivi "Seconda condizione: formula 3xf + 6xg + 4xh + 4xi + 5xl = somma 1^ estr. x 2, oppure il suo diametrale"
Scrivi "Verifica: 3 x "& f &" + 6 x "& g &" + 4 x "& h &" + 4 x "& i &" + 5 x "& l &" = "&cond2 &" condizione verificata!"
Scrivi "Terza condizione: formula 3xS1 + S2 + c + 2xd + 3xe + 3xf + g + h - l = deve essere 90"
Scrivi "Verifica: 3 x "& s1 &" + "& s2 &" + "& c &" + 2 x "& d &" + 3 x "& e &" + 3 x "& f &" + "& g &" + "& h &" - "& l &" = "&eq1
Scrivi "Con tutte le condizioni verificate, si ricava l'Ambata da giocare",1
Scrivi "FORMULA: S1 - S2 + a + f - g ... (tradotto in "& s1 &" - "& s2 &" + "& a &" + "& f &" - "& g &") = "& byron
Scrivi
ImpostaGiocata 1,nu,rt,pt,clp
Gioca es
End If
End If
End If
Next
Next
ScriviResoconto 1
End Sub