Private Sub Worksheet_Activate()
Dim limite, d As Object, w As Worksheet, c As Range, n&, a(), lig&, v
limite = TimeValue("8:15")
Set d = CreateObject("Scripting.Dictionary")
For Each w In Worksheets
If w.Name <> "Cumule" Then
For Each c In w.Columns(1).SpecialCells(xlCellTypeConstants)
If IsNumeric(c) Then
If Not d.exists(c.Value) Then
n = n + 1
d(c.Value) = n 'mémorise la ligne
ReDim Preserve a(1 To 3, 1 To n)
a(1, n) = c 'matricule
a(2, n) = c(1, 2) 'nom
End If
lig = d(c.Value)
v = Val(Replace(c(1, 3), ",", ".")) - limite
If v > 0 Then a(3, lig) = a(3, lig) + v 'cumul
End If
Next c
End If
Next w
'---restitution---
If FilterMode Then ShowAllData 'si la feuille est filtrée
With [A3] '1ère cellule de destination, à adapter
If n Then
With .Resize(n, 3)
.Value = Application.Transpose(a) 'Transpose est limitée à 65536 lignes
.Borders.Weight = xlThin 'bordures
End With
End If
.Offset(n).Resize(Rows.Count - n - .Row + 1, 3).Delete xlUp 'RAZ en dessous
End With
End Sub