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 12 luglio 2025
    Bari
    67
    30
    66
    89
    47
    Cagliari
    06
    66
    33
    32
    37
    Firenze
    43
    25
    78
    21
    23
    Genova
    34
    20
    85
    52
    33
    Milano
    36
    19
    02
    70
    77
    Napoli
    21
    72
    74
    15
    53
    Palermo
    32
    08
    37
    02
    86
    Roma
    27
    32
    12
    67
    06
    Torino
    45
    47
    08
    13
    32
    Venezia
    29
    34
    19
    51
    53
    Nazionale
    34
    18
    56
    47
    85
    Estrazione Simbolotto
    Nazionale
    02
    26
    01
    08
    17

Ultimi Messaggi

Indietro
Alto