Novità

x Statix57

  • Creatore Discussione Creatore Discussione Roby
  • Data di inizio Data di inizio
Stato
Chiusa ad ulteriori risposte.
R

Roby

Guest
hai una foruma in excel per il calcolo combinatorio ???? solo per i terni con 90 numeri ???


però in excel me li dovrebbe sviluppare

per ora ti ringrazio se hai questo è fatta :D
 
Ciao ecco questa macro ti sviluppa sia le combinazioni per ambo che per terno.
cosi funziona per Terno

Codice:
Sub Amberno()
Dim I As Integer: Dim J As Integer: Dim K As Integer
For I = 1 To 90
For J = 1 + I To 90
For K = 1 + J To 90                  'TERNO
If J = I Or K = I Or K = J Then GoTo skip:    '<<< TERNO/-Ambo
'If J = I Or K = I Then GoTo skip:             ' <<< AMBO/-Terno
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) = I
Cells(Rows.Count, 1).End(xlUp).Offset(0, 1) = J
Cells(Rows.Count, 1).End(xlUp).Offset(0, 2) = K     'TERNO
skip:
Next K            'Terno
Next J
Next I
End Sub

Così per ambo
Codice:
Sub Amberno()
Dim I As Integer: Dim J As Integer: Dim K As Integer
For I = 1 To 90
For J = 1 + I To 90
'For K = 1 + J To 90                  'TERNO
'If J = I Or K = I Or K = J Then GoTo skip:    '<<< TERNO/-Ambo
If J = I Or K = I Then GoTo skip:             ' <<< AMBO/-Terno
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) = I
Cells(Rows.Count, 1).End(xlUp).Offset(0, 1) = J
'Cells(Rows.Count, 1).End(xlUp).Offset(0, 2) = K     'TERNO
skip:
'Next K            'Terno
Next J
Next I
End Sub
 
credo per la cinquina non si possa fare ,in quanto excel non gestirebbe il quantitativo di righe,
excel 2007 arrivano fino ad un milione per 16000 colonne.
excel 97/2003 righe 65000 per 1024 colonne.
approssitivamente.
 
Ciao Statix,
Premetto che in fatto di excel sono a zero, vorrei applicare la tua
macro, cosa devo fare?.
grazie alce
 
Stato
Chiusa ad ulteriori risposte.

Ultima estrazione Lotto

  • Estrazione del lotto
    sabato 05 luglio 2025
    Bari
    25
    89
    22
    77
    56
    Cagliari
    05
    87
    46
    70
    49
    Firenze
    17
    85
    66
    59
    54
    Genova
    90
    65
    07
    44
    62
    Milano
    60
    84
    26
    78
    43
    Napoli
    71
    78
    86
    76
    84
    Palermo
    23
    42
    82
    60
    88
    Roma
    86
    60
    85
    19
    01
    Torino
    59
    30
    54
    29
    60
    Venezia
    90
    20
    71
    03
    81
    Nazionale
    70
    36
    74
    27
    38
    Estrazione Simbolotto
    Nazionale
    02
    32
    40
    16
    19
Indietro
Alto