Sub code_SD_1feuilledetravail()
' code transmis par laetitia90 (+ Job75)
Dim m As Object, resu(), w, t, i As Long, C As Byte, z As String, x As Long
Set m = CreateObject("Scripting.Dictionary")
ReDim resu(1 To Rows.Count, 1 To 5)
'--constitution
For Each w In Sheets(Array("FEUILLE1", "FEUILLE2", "FEUILLE3"))
t = w.Range("a2:f" & w.Cells(w.Rows.Count, 1).End(3).Row).Value2
For i = 1 To UBound(t)
z = t(i, 1) & t(i, 2)
If m.Exists(z) Then
For C = 5 To 6: resu(m(z), C - 2) = resu(m(z), C - 2) + t(i, C): Next C
resu(m(z), 5) = resu(m(z), 5) + 1
Else
x = x + 1
For C = 1 To 2: resu(x, C) = t(i, C): Next C
For C = 5 To 6: resu(x, C - 2) = t(i, C): Next C
m(z) = x
resu(x, 5) = 1
End If
Next i, w
'--restitution
Sheets(1).[A2].Resize(x, 5) = resu
End Sub