Option Explicit
Sub Essai()
If ActiveSheet.Name <> "j'ai" Then Exit Sub
Dim dlg&: dlg = Cells(Rows.Count, 1).End(3).Row
If dlg = 1 And IsEmpty([A1]) Then Exit Sub
Dim ref$, chn$, lg1&, lg2&, dh As Byte
lg2 = 1: dh = 1: Application.ScreenUpdating = 0
With Worksheets("je veux")
For lg1 = 1 To dlg
ref = Cells(lg1, 1): chn = Cells(lg1, 2)
With .Cells(lg2, 1)
If .Value <> "" Then _
If ref <> .Value Then lg2 = lg2 + 1: dh = 1
End With
With .Cells(lg2, 1)
.Value = ref: .Offset(, dh) = chn: dh = dh + 1
End With
Next lg1
.Select
End With
End Sub