Formules tournoi

patate38

XLDnaute Junior
Bonsoir,
Je voudrais de l'aide SVP pour un tournoi de hand, calculer les séries de victoires ou défaites.
En espérant avoir bien formulé ma demande dans le document joint.
Je vous remercie bien.
 

Pièces jointes

  • Formules pour un tournoi.xlsx
    10.8 KB · Affichages: 41
  • Formules pour un tournoi.xlsx
    10.8 KB · Affichages: 46

patate38

XLDnaute Junior
Re : Formules tournoi

Bonsoir,
ça marche très bien. Est on obliger de passer par l'étape des colonnes F et G ?
Comment faire lorsqu'on a Jaune-Rouge dans une cellule et que l'on veut mettre chacun dans une cellule différente sans le -
Même question pour le score 20-18 (devient 20 puis 18 sans le -).
Merci en tout cas pour cette réponse efficace.
 

JBARBE

XLDnaute Barbatruc
Re : Formules tournoi

Bonjour JBARBE,
Très pratique mais je ne sais pas utiliser le macro, or je voudrais changer à souhait le nombre de club, leurs noms, leurs résultats.

Chose faite !

Néanmoins les totaux commencent à la colonne 25 qu'il conviendra de modifier s'il y a lieu dans les lignes suivantes repérées par ' colonne 24 ( avant les totaux) & colonne 25 & colonne 26 & colonne 27 en vert !

Sans oublier de modifier dans le gestionnaire de noms, la "Zone_Saisie " concernant les cellules concernées par la couleurs !

For k = 8 To 24 ' colonne 24
If Cells(i, 3) > Cells(i, 4) And Cells(j, k) = "" Then
Cells(j, k) = "V"
Cells(j, k).Interior.ColorIndex = 23
Cells(j, 25) = Cells(j, 25) + 1 ' colonne 25
Cells(j, 25).Interior.ColorIndex = 23 ' colonne 25
Exit For
ElseIf Cells(i, 3) < Cells(i, 4) And Cells(j, k) = "" Then
Cells(j, k) = "D"
Cells(j, k).Interior.ColorIndex = 3
Cells(j, 26) = Cells(j, 26) + 1 ' colonne 26
Cells(j, 26).Interior.ColorIndex = 3 ' colonne 26
Exit For
ElseIf Cells(i, 3) = Cells(i, 4) And Cells(j, k) = "" Then
Cells(j, k) = "N"
Cells(j, k).Interior.ColorIndex = 6
Cells(j, 27) = Cells(j, 27) + 1 ' colonne 27
Cells(j, 27).Interior.ColorIndex = 6 ' colonne 27
Exit For
End If
Next k

For n = 8 To 24 ' colonne 24
If Cells(l, 3) < Cells(l, 4) And Cells(m, n) = "" Then
Cells(m, n) = "V"
Cells(m, n).Interior.ColorIndex = 23
Cells(m, 25) = Cells(m, 25) + 1 ' colonne 25
Cells(m, 25).Interior.ColorIndex = 23 ' colonne 25
Exit For
ElseIf Cells(l, 3) > Cells(l, 4) And Cells(m, n) = "" Then
Cells(m, n) = "D"
Cells(m, n).Interior.ColorIndex = 3
Cells(m, 26) = Cells(m, 26) + 1 ' colonne 26
Cells(m, 26).Interior.ColorIndex = 3 ' colonne 26
Exit For
ElseIf Cells(l, 3) = Cells(l, 4) And Cells(m, n) = "" Then
Cells(m, n) = "N"
Cells(m, n).Interior.ColorIndex = 6
Cells(m, 27) = Cells(m, 27) + 1 ' colonne 27
Cells(m, 27).Interior.ColorIndex = 6 ' colonne 27
Exit For
End If
Next n

bonne journée !
 

Pièces jointes

  • Formules pour un tournoi1.xlsm
    27 KB · Affichages: 38
  • Formules pour un tournoi1.xlsm
    27 KB · Affichages: 40
Dernière édition:

JBARBE

XLDnaute Barbatruc
Re : Formules tournoi

En gras les N° de colonnes des totaux à changer s'il a lieu

Clic droit sur le bouton GO >> affecté une macro >> modifier


For k = 8 To 24 ' colonne 24 est la colonne avant les totaux colonne 25 & 26 & 27
Cells(j, 25) = Cells(j, 25) + 1 ' colonne 25 est le début des totaux
Cells(m, 25) = Cells(m, 25) + 1 ' colonne 25 idem
Cells(j, 25).Interior.ColorIndex = 23 ' colonne 25 est la coloration en bleue de la colonne 25
Cells(m, 25).Interior.ColorIndex = 23 ' colonne 25 idem

Cells(j, 26) = Cells(j, 26) + 1 ' colonne 26
Cells(j, 26).Interior.ColorIndex = 3 ' colonne 26
Cells(m, 26) = Cells(m, 26) + 1 ' colonne 26
Cells(m, 26).Interior.ColorIndex = 3 ' colonne 26

Cells(j, 27) = Cells(j, 27) + 1 ' colonne 27
Cells(j, 27).Interior.ColorIndex = 6 ' colonne 27
Cells(m, 27) = Cells(m, 27) + 1 ' colonne 27
Cells(m, 27).Interior.ColorIndex = 6 ' colonne 27


Puis :

Formules > gestionnaire de noms > adapter le nom " Zone_Saisie " ici : H2 : AA9

@+
 
Dernière édition:

JBARBE

XLDnaute Barbatruc
Re : Formules tournoi

Les totaux ont été reportés de la colonne 35 à 37

For k = 8 To 34 ' colonne 34 a été reporté à la colonne 34

For n = 8 To 34 ' colonne 34 idem !

Formules > gestionnaire de noms > le nom " Zone_Saisie " ici : H2 : AK9
 

Pièces jointes

  • Formules pour un tournoi1.xlsm
    27.3 KB · Affichages: 34
  • Formules pour un tournoi1.xlsm
    27.3 KB · Affichages: 43

JBARBE

XLDnaute Barbatruc
Re : Formules tournoi

Un essai effectué avec 30 équipes et 20 tournois !

bonne soirée !
 

Pièces jointes

  • Formules pour un tournoi2.zip
    140.1 KB · Affichages: 37
  • Formules pour un tournoi2.zip
    140.1 KB · Affichages: 30
Dernière édition:

Discussions similaires

Statistiques des forums

Discussions
312 181
Messages
2 085 997
Membres
103 083
dernier inscrit
SALAHBEN