Bonsoir Jonathan SOMNICA, bienvenue sur XLP ,
Essayez le code suivant dans module1 :
Sub XXX()
Dim t, i&, j&, j1&, j2&, k&, n&
With Sheets("Synth.Réparation")
If .FilterMode Then .ShowAllData
t = Intersect(.Range("a1").CurrentRegion, .Columns("f:y"), .Range("a3:a" & Rows.Count).EntireRow)
For i = 1 To UBound(t)
For j1 = 1 To UBound(t, 2)
If Trim(t(i, j1)) <> "" Then Exit For
Next j1
For j2 = UBound(t, 2) To 1 Step -1
If Trim(t(i, j2)) <> "" Then Exit For
Next j2
For j = j1 + 1 To j2 - 1
If Trim(t(i, j)) = "" Then t(i, j) = "X"
Next j
Next i
.Range("f3").Resize(UBound(t), UBound(t, 2)) = t
End With
End Sub