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
    venerdì 24 ottobre 2025
    Bari
    33
    75
    32
    35
    10
    Cagliari
    73
    68
    58
    49
    59
    Firenze
    31
    11
    21
    13
    69
    Genova
    27
    35
    21
    42
    59
    Milano
    22
    11
    64
    62
    19
    Napoli
    77
    88
    51
    30
    75
    Palermo
    04
    43
    72
    59
    45
    Roma
    84
    58
    60
    46
    23
    Torino
    13
    27
    31
    86
    49
    Venezia
    45
    03
    70
    14
    56
    Nazionale
    68
    47
    02
    01
    18
    Estrazione Simbolotto
    11
    37
    05
    27
    28
Indietro
Alto