Ritardi Ambo Lotto



  • Ritardi Ambo Lotto
    di Davide (utente non iscritto) data: 20/07/2017 15:21:44

    Salve a tutti sono appassionato di Lotto , ho fatto una macro per i ritardi Ambi Lotto ma niente non va proprio quella per Ambate mi va benissimo ,è comunque molto critica , ma quando aggiungo la seconda colonna per Ambo non trovo il modo di farla andare , grazie a chiunque possa aiutarmi

    allego anche il mio File
     
    Private Sub CommandButton1_Click()
    Sviluppo = WorksheetFunction.Count(Range("AK:AK"))
    Application.ScreenUpdating = False
    fre = 0
    N1 = 0
    N2 = 0
    For H = 1 To Sviluppo
    For X = 1 To 200
    For Y = 1 To 5
    If Cells(2 + X, 2 + Y) = Cells(2 + H, 37) Then
    N1 = X - 2
    End If
    If Cells(2 + X, 2 + Y) = Cells(2 + H, 37) Then
    fre = fre + 1
    N2 = X - 1
    If Cells(2 + H, 46) = "" Then        ' Ritardo
    Cells(2 + H, 46) = X - 1             ' Aggiorna Ritardo
    Cells(2 + H, 47) = X - 1             ' Primo ritardo Max
    End If
    B = N2 - N1 - 1
    If Cells(2 + H, 47) < B Then
    Cells(2 + H, 47) = B          'Aggiorna Ritardo Max
    End If
    End If
    Next Y
    Next X
    Cells(2 + H, 45) = fre               ' Frrquenza
    fre = 0
    Next H
    End Sub