Bonjour,
Ah, ce n'est pas vraiment la même chose .
Voici un essai non testé :
Sub concatener()
Set dico = CreateObject("Scripting.dictionary")
With Sheets("Commande").usedrange.offset(1, 0)
t = .value
For i = lbound(t) To ubound(t)
If Not dico.exists(t(i, 1)) Then
n = n + 1
dico(t(i, 1)) = n
for k = lbound(t, 2) to ubound(t, 2)
t(n, k) = t(i, k)
next k
Else
't(dico(t(i, 1)), 5) = t(dico(t(i, 1)), 5) & "-" & t(i, 5) '<< colonne E au cas où
t(dico(t(i, 1)), 18) = t(dico(t(i, 1)), 18) & "-" & t(i, 18) '<< colonne R
End If
Next i
.ClearContents
.Resize(n, ubound(t, 2)).Value = t
End With
End Sub
On s'en approche, je pense...
Cdlt,