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
    martedì 08 luglio 2025
    Bari
    29
    56
    53
    47
    86
    Cagliari
    31
    25
    53
    71
    76
    Firenze
    24
    12
    70
    90
    16
    Genova
    84
    79
    48
    81
    51
    Milano
    54
    73
    46
    53
    64
    Napoli
    64
    48
    73
    81
    47
    Palermo
    05
    60
    43
    63
    33
    Roma
    15
    82
    55
    13
    68
    Torino
    83
    13
    39
    53
    74
    Venezia
    52
    66
    24
    08
    41
    Nazionale
    76
    14
    90
    09
    12
    Estrazione Simbolotto
    Nazionale
    33
    27
    20
    14
    11

Ultimi Messaggi

Indietro
Alto