Sub test()
'Déclaration ===================================
Dim F_S As Worksheet, F_D As Worksheet, Cel As Range, X As Long, Col As Integer, rep As Integer
'MEI ===========================================
Set F_S = Sheets("Feuil2") 'Feuille source
Set F_D = Sheets("Feuil1") 'Feuille destination
'Traitement ====================================
'Boucle ----------------------------------------
For X = 4 To F_S.Cells(Rows.Count, "B").End(xlUp).Row
'Pour x=4 à dernière ligne non-vide en B
'recherche de la colonne de destination ------------------------
Set Cel = F_D.Rows(2).Find(what:=F_S.Cells(X, "E"), lookat:=xlWhole)
'cel = cellule contenant la valeur de la cellule C, ligne X, cellule entière)
If Not (Cel Is Nothing) Then
'si cel existe, alors
Col = Cel.Column + 1
'recherche de la ligne de destination ----------------------
Set Cel = F_D.Columns(2).Find(what:=F_S.Cells(X, "B"), lookat:=xlWhole)
If Not (Cel Is Nothing) Then
F_D.Cells(Cel.Row, Col) = F_S.Cells(X, "Q")
Else
rep = MsgBox("on continue ?", vbQuestion + vbYesNo, F_S.Cells(X, "B") & " absent de la liste")
If rep = 7 Then Exit Sub
'si la réponse est non, on sort
End If
Else ' la date n'existe pas
rep = MsgBox("on continue ?", vbQuestion + vbYesNo, "date non trouvée pour la ligne " & X)
If rep = 7 Then Exit Sub
'si la réponse est non, on sort
End If
Next X
'Fin boucle -----------------------------------
End Sub