Novità

Macro e lotto piccolo problema chi mi può aiutare per cortesia

TONY@

Advanced Member >PLATINUM PLUS<
Buongiorno un piccolo problema che non riesco a risolvere
la macro mi ordina i numeri cercati in verticale ,io ho bisogno di vederli in orizzontale
se considero solo un uscita estraz...riesco a farli mettere in orizz, ma quando ci sono più uscite tipo 5
allora non si può fare li accavalla i risultati ,non sono molto pratico di macro ,come posso risolvere il problema ?
Vorrei che le estraz..che trova le disponga riga per riga da o5 -s5
in giù a scendere come da esempio 2 sotto.
grazie mille forse e una piccolezza ma non trovo la soluzione

74
64 esempio
90 cosi sono adesso metto solo due colonne di esempio
32
43

20
7
42
40
66
..............................................................................................
esempio 2

74 64 90 32 43 <<<<cosi andrebbero benissimo a scendere
20 7 42 40 66

.................................................................................
H2 I2 J3 K2
10 10 5
5

-----------------------------------------------------------------------------------------------
Sub UNOSOPRA()
Range("O5:Z9").ClearContents

UE = Worksheets("Foglio1").Range("A" & Rows.Count).End(xlUp).Row
Area = Worksheets("Foglio1").Range("A6:AX" & UE)
valore = Range("g4").Value
If [i2] > 50 Then
MsgBox "Digitare N. Colonne (da 2 a 50)"
Range("h2").Select
GoTo Fine
End If
If [h2] = 0 Then
MsgBox "Digitare N. Colonne (da 1 a 49)"
Range("i2").Select
GoTo Fine
End If

If [h2] > [i2] Then
MsgBox "Inizio N. Colonne maggiore di Fine N. Colonne, correggere!"
Range("j2").Select
GoTo Fine
End If

If [J2] = "" Then
MsgBox "digitare inizio riga"
Range("J2").Select
GoTo Fine
End If
If [g4] = "" Then
MsgBox "digitare Numeri da trovare"
Range("K2").Select
GoTo Fine
End If
inizio = [J2]
For RR = inizio To UE
For CC = [h2] To [i2]
If Worksheets("Foglio1").Cells(RR, CC).Value = valore Then

Cells(5, TR + 15).Value = Worksheets("Foglio1").Cells(RR - 1, CC - 8).Value
Cells(6, TR + 15).Value = Worksheets("Foglio1").Cells(RR - 1, CC - 7).Value
Cells(7, TR + 15).Value = Worksheets("Foglio1").Cells(RR - 1, CC - 6).Value
Cells(8, TR + 15).Value = Worksheets("Foglio1").Cells(RR - 1, CC - 5).Value
Cells(9, TR + 15).Value = Worksheets("Foglio1").Cells(RR - 1, CC - 4).Value

TR = TR + 1
If TR = Range("K2").Value Then GoTo esci
End If
Next CC
Next RR
esci:
Fine:
End Sub
 
Si ma è meglio che alleghi il tuo file di esempio altrimenti bisogna ricostruire tutto il scenario
 
Si ma è meglio che alleghi il tuo file di esempio altrimenti bisogna ricostruire tutto il scenario
non me lo fa caricare lo zippato l'estensione file excel non lo accetta nemmeno zip 500 kb
,ho messo la macro credevo bastasse variare qualcosa all'interno della macro non so come devo fare grazie x l'interesse
 
Sub unoAMBI()
Range("O10:ah14").ClearContents

UE = Worksheets("Foglio1").Range("A" & Rows.Count).End(xlUp).Row
Area = Worksheets("Foglio1").Range("A6:AX" & UE)
valore = Range("g4").Value
If [i2] > 50 Then
MsgBox "Digitare N. Colonne (da 2 a 50)"
Range("h2").Select
GoTo Fine
End If
If [h2] = 0 Then
MsgBox "Digitare N. Colonne (da 1 a 49)"
Range("i2").Select
GoTo Fine
End If

If [h2] > [i2] Then
MsgBox "Inizio N. Colonne maggiore di Fine N. Colonne, correggere!"
Range("j2").Select
GoTo Fine
End If

If [J2] = "" Then
MsgBox "digitare inizio riga"
Range("J2").Select
GoTo Fine
End If
If [g4] = "" Then
MsgBox "digitare Numeri da trovare"
Range("K2").Select
GoTo Fine
End If
inizio = [J2]
For RR = inizio To UE
For CC = [h2] To [i2]
If Worksheets("Foglio1").Cells(RR, CC).Value = valore Then

Cells(5, TR + 15).Value = Worksheets("Foglio1").Cells(RR, CC - 8).Value
Cells(6, TR + 15).Value = Worksheets("Foglio1").Cells(RR, CC - 7).Value
Cells(7, TR + 15).Value = Worksheets("Foglio1").Cells(RR, CC - 6).Value
Cells(8, TR + 15).Value = Worksheets("Foglio1").Cells(RR, CC - 5).Value
Cells(9, TR + 15).Value = Worksheets("Foglio1").Cells(RR, CC - 4).Value



TR = TR + 1
If TR = Range("K2").Value Then GoTo esci
End If
Next CC
Next RR
esci:
Fine:
End Sub
 
Nel modulo 121 sostituisci quelle esistenti con queste sotto


Cells(5 + TR, 15).Value = Worksheets("Foglio1").Cells(RR, CC - 8).Value
Cells(5 + TR, 16).Value = Worksheets("Foglio1").Cells(RR, CC - 7).Value
Cells(5 + TR, 17).Value = Worksheets("Foglio1").Cells(RR, CC - 6).Value
Cells(5 + TR, 18).Value = Worksheets("Foglio1").Cells(RR, CC - 5).Value
Cells(5 + TR, 19).Value = Worksheets("Foglio1").Cells(RR, CC - 4).Value
 

Oscar grande va benissimo adesso ho capito il problema io non ci sarei mai arrivato grazie mille​

Cells(10, TR + 15).Value = Worksheets("Foglio1").Cells(RR, CC - 8).Value

Cells(10 + TR, 15).Value = Worksheets("Foglio1").Cells(RR, CC - 8).Value
 

Ultima estrazione Lotto

  • Estrazione del lotto
    giovedì 16 ottobre 2025
    Bari
    03
    66
    37
    18
    61
    Cagliari
    26
    22
    85
    20
    43
    Firenze
    29
    61
    85
    67
    75
    Genova
    40
    63
    74
    19
    78
    Milano
    43
    80
    34
    54
    70
    Napoli
    18
    78
    89
    15
    27
    Palermo
    38
    84
    88
    06
    62
    Roma
    60
    14
    40
    84
    43
    Torino
    51
    62
    58
    65
    52
    Venezia
    07
    61
    48
    63
    87
    Nazionale
    60
    36
    11
    28
    31
    Estrazione Simbolotto
    29
    02
    24
    03
    37

Ultimi Messaggi

Indietro
Alto