Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [B4:E4]) Is Nothing Then Exit Sub
Dim nom$, lig As Variant, col As Variant
[G3:G7] = "" 'RAZ
If [C4] & [D4] & [E4] = "" Then Exit Sub
nom = "'" & Feuil2.Name & "'!"
lig = Application.Match([C4] & [D4] & [E4], Evaluate(nom & "A1:A5000&" & nom & "B1:B5000&" & nom & "D1:D5000"), 0)
col = Application.Match([B4], Feuil2.[1:1], 0)
If IsNumeric(lig) And IsNumeric(col) Then _
[G3:G7] = Feuil2.Cells(lig, col).Resize(5).Value
End Sub
Private Sub CommandButton1_Click() 'Transfert
If [C4] & [D4] & [E4] = "" Then Exit Sub
Dim nom$, lig As Variant, col As Variant, n&
nom = "'" & Feuil2.Name & "'!"
lig = Application.Match([C4] & [D4] & [E4], Evaluate(nom & "A1:A5000&" & nom & "B1:B5000&" & nom & "D1:D5000"), 0)
col = Application.Match([B4], Feuil2.[1:1], 0)
n = Abs(Int(Val([E6]))) 'nombre de semaines
If n = 0 Then n = 1
[E6] = n
If IsNumeric(lig) And IsNumeric(col) Then
For n = 0 To n - 1
Feuil2.Cells(lig + 15 * n, col).Resize(5) = [G3:G7].Value
Next
End If
End Sub