Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim n As Integer, w As Worksheet
n = Val(Sh.Name) - 1
If n < 1 Then Exit Sub
Application.ScreenUpdating = False
If Application.Count(Sh.[G3:G200].Offset(, n)) = 0 Then
For Each w In Worksheets
If Val(w.Name) = n Then w.Cells.Copy Sh.[A1]: Exit For
Next
Sh.[A1].Copy Sh.[A1] 'vide le presse-papier
End If
'---classement---
Sh.[K:K].Insert 'insère une colonne auxiliaire
Sh.[K3:K200].FormulaR1C1 = "=IF(COUNT(RC7:RC10),AVERAGE(RC7:RC10),0)"
Sh.[B3:K200].Sort Sh.[K3], xlDescending, Header:=xlNo
Sh.[K:K].Delete 'supprime la colonne auxiliaire
End Sub