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
    martedì 16 settembre 2025
    Bari
    26
    29
    18
    10
    69
    Cagliari
    28
    35
    57
    44
    17
    Firenze
    19
    29
    49
    15
    17
    Genova
    23
    37
    13
    90
    58
    Milano
    33
    84
    76
    24
    79
    Napoli
    78
    15
    03
    24
    56
    Palermo
    80
    24
    41
    08
    75
    Roma
    55
    62
    83
    34
    69
    Torino
    27
    80
    69
    51
    84
    Venezia
    89
    74
    72
    82
    21
    Nazionale
    45
    20
    85
    33
    67
    Estrazione Simbolotto
    Palermo
    21
    19
    27
    36
    18
Indietro
Alto