1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| Private Sub CommandButton4_Click()
Range("A5:J104").Select
ActiveWindow.ScrollRow = 1
Selection.Sort Key1:=Range("J5"), Order1:=xlDescending, Key2:=Range("I5") _
, Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom
Range("K5:K104").Select
Selection.Font.ColorIndex = 3
Range("B4").Select
Dim Plage As Range, i&, Cell As Range, Rng As Range
On Error Resume Next
Set Plage = Range("I5:I104")
If IsEmpty(Plage) Then Exit Sub
Application.ScreenUpdating = False
For Each Cell In Plage
For i = 1 To Plage.Count
Set Rng = Cell.Offset(i)
If Rng <> "" And Rng = Cell Then
Cell.Interior.ColorIndex = 39
Rng.Interior.ColorIndex = 39
Exit For
End If
Next i
Next Cell
'MsgBox "Vous avez des joueurs avec le même nombre de points", vbInformation, " Attention !"
End Sub |
Partager