Sub Macro1()
Dim i&, j&, DerL&
Dim Ws1 As Worksheet, Ws2 As Worksheet
Dim PlageWs1 As Range, PlageWs2 As Range
Set Ws1 = Worksheets("Fusion"): Set Ws2 = Worksheets("Salaires au 31 12")
Set PlageWs1 = Ws1.Range(Ws1.Cells(i, 2), Ws1.Cells(i, 4))
Set PlageWs2 = Ws2.Range(Ws2.Cells(j, 2), Ws2.Cells(j, 4))
With Ws2
For i = 1 To .Cells(Rows.Count, 1).End(xlUp).Row
DerL = Ws1.Cells(Rows.Count, 1).End(xlUp)(2).Row
If Not IsError(Application.Match(PlageWs1, PlageWs2, 0)) Then
For j = 1 To DerL
If Ws1.Range(Ws1.Cells(j, 2) + Ws1.Cells(j, 3) + Ws1.Cells(j, 4)) = .Range(.Cells(i, 2) + .Cells(i, 3) + .Cells(i, 4)) Then
Ws1.Cells(j, 18) = .Cells(i, 13)
Ws1.Cells(j, 19) = .Cells(i, 14)
Ws1.Cells(j, 20) = .Cells(i, 17)
End If
Next
Else
Ws1.Cells(DerL, 1) = .Cells(i, 1)
Ws1.Cells(DerL, 2) = .Cells(i, 2)
Ws1.Cells(DerL, 3) = .Cells(i, 3)
Ws1.Cells(DerL, 4) = .Cells(i, 4)
Ws1.Cells(DerL, 5) = .Cells(i, 5)
Ws1.Cells(DerL, 6) = .Cells(i, 6)
Ws1.Cells(DerL, 7) = .Cells(i, 7)
Ws1.Cells(DerL, 8) = .Cells(i, 8)
Ws1.Cells(DerL, 9) = .Cells(i, 9)
Ws1.Cells(DerL, 10) = .Cells(i, 10)
Ws1.Cells(DerL, 11) = .Cells(i, 11)
Ws1.Cells(DerL, 12) = .Cells(i, 12)
Ws1.Cells(DerL, 15) = .Cells(i, 15)
Ws1.Cells(DerL, 16) = .Cells(i, 16)
Ws1.Cells(DerL, 18) = .Cells(i, 13)
Ws1.Cells(DerL, 19) = .Cells(i, 14)
Ws1.Cells(DerL, 20) = .Cells(i, 17)
DerL = DerL + 1
End If
Next
End With
End Sub