Sub Macro()
Dim datejour As Range
Dim datej As Range
Dim X As Integer
' ActiveSheet.Paste Destination:=Worksheets("Feuil1").Range(.Cells(4, X + 1), .Cells(200, X + 1))
Dim Nom As String, i As Long, j As Long 'Collage en fonction des conditions (PROBLEME A PARTIR DE LA)
Sheets(1).Select
i = 4
With Sheets(2)
Do While Cells(i, 2) <> "FIN"
Nom = Cells(i, 2)
For j = 4 To .Range("B200").End(xlUp).Row
If Nom = .Cells(j, 2) Then
Set datejour = Worksheets("Feuil2").Cells(j, 5)
With Worksheets("Feuil1").Range("A2:Z2")
Set datej = .Find(datejour, LookIn:=xlFormulas)
X = datej.Column
End With
Sheets(1).Cells(i, X).Value = Sheets(2).Cells(j, 17).Value
Exit For
End If
Next
i = i + 1
Loop
End With
End Sub