Bonjour,
Je regarde, tu coche en jaune toujours 5 chiffres ?
édit: ci-joint fichier
Amicalement
Claude
-- Lun Oct 04, 2010 9:31 am --
Bonjour,
Autre version un peu plus avancée "ange175_LouezLes3"
ici, je note les 3 chiffres maxi parmis les cases en jaune
(on pourrait ne prendre qu'un seul maxi), à toi de voir !
Sub Ajouer()
'Macros par Claude Dubois pour "angel75" Excel-Pratique le 04/10/10
Dim Lg%, x%, z%, A As Byte, i As Byte, J As Byte, Cl As Byte
Lg = Range("A65536").End(xlUp).Row
Application.ScreenUpdating = False
Call EffaceRouge
Cl = 22
For J = 1 To 3
For A = 2 To Lg Step 3
For i = 2 To 21
If Cells(A, i).Interior.ColorIndex = 6 Then
Range("z65536").End(xlUp)(2) = Cells(A, i)
End If
Next i
x = Application.Max(Columns(26))
If x > 0 Then
z = Application.Match(x, _
Range(Cells(A, 2), Cells(A, 21)), 0)
Cells(A, Cl) = z
Cells(A, z + 1).Interior.ColorIndex = 3
Else: Cells(A, Cl).ClearContents
End If
Columns(26).ClearContents
Next A
Cl = Cl + 1
Next J
End Sub
Lire le fonctionnement dans le commentaire "Aide" en A1
J'ai supprimé le code et fichier précédent
Amicalement
Claude