Non so a cosa servano quelle righe che hai aggiunto sotto ogni estrazioni.
Se lo scopo è quello di ottenere le estrazioni del 10 & lotto dalle singole estrazioni posizionate secondo il tuo schema
fai una copia del "foglio1" e rinomina questo foglio in "Progr" poi inserisci in un modulo questa macro e avviala
- Codice: Seleziona tutto
Sub Compila()
Worksheets("Progr").Select
UR = Worksheets("Progr").Range("D" & Rows.Count).End(xlUp).Row
If UR < 22 Then UR = 22
Rows("22:" & UR).Clear
UC = Worksheets("Progr").Range("IV7").End(xlToLeft).Column
For CC = 4 To UC Step 7
URD = Worksheets("Progr").Range("C" & Rows.Count).End(xlUp).Row + 1
If URD < 22 Then URD = 22
Range("C" & URD).Value = DateSerial(Mid(Cells(7, CC).Text, 7, 4), Mid(Cells(7, CC).Text, 4, 2), Mid(Cells(7, CC).Text, 1, 2))
CN = 0
For CCE = CC To CC + 4
For RRE = 8 To 17
UCE = Worksheets("Progr").Range("IV" & URD).End(xlToLeft).Column + 1
TN = 0
For CCN = 4 To UCE
If Cells(URD, CCN).Value = Cells(RRE, CCE).Value Then TN = TN + 1
Next CCN
If CCN = 25 Then GoTo SaltaE
If TN = 0 Then Cells(URD, CCN - 1).Value = Cells(RRE, CCE).Value
Next RRE
Next CCE
SaltaE:
Next CC
End Sub
Fai sapere
ciao