Private Sub CommandButton1_Click()
Dim i&, j&, k&, l&, t, w(), saute(), Plg1 As Range, Plg2 As Range, Fl As Worksheet
'============================================= PARAMETRES =============================================
Set Plg1 = Me.Range("B3:F3") 'Plage à copier
Set Plg2 = Me.Range("B8:F8") 'Plage de contrôle
Set Fl = Feuil2 'Feuille de destination
saute = Array("FERMETURE HEBDO*", "SOLDE FIN DE MOIS*", "TOTAL SEMAINE*") 'Lignes à sauter.
'(Les lignes commençant par "FERMETURE HEBDO", "SOLDE FIN DE MOIS", "TOTAL SEMAINE" seront ignorées.)
'======================================================================================================
Plg2.ClearContents
l = UBound(saute)
w = Plg1.Value
k = Plg1.Columns.Count
With Fl
For i = 3 To .Rows.Count
t = .Cells(i, 1).Value
For j = 0 To l
If t Like saute(j) Then Exit For
Next
If j > l Then
For j = 3 To 2 + k
If Not IsEmpty(.Cells(i, j)) Then Exit For
Next
If j > 2 + k Then
.Cells(i, 3).Resize(, k).Value = w
Plg2.Value = w
Exit For
End If
End If
Next
End With
End Sub