Another variant
Sub jec()
Dim jv, dest As Variant, i As Long, j As Long
Application.ScreenUpdating = False
Application.DisplayAlerts = False
jv = Sheets("Input Format").Cells(1, 1).CurrentRegion.Value2
Set dest = Sheets("Output Format").Cells(8, 1)
With CreateObject("scripting.dictionary")
For i = jv(1, 1) To jv(UBound(jv), 1)
For j = 1 To UBound(jv)
If i = jv(j, 1) Then .Item(i) = .Item(i) & jv(j, 2) & "|"
Next
If IsEmpty(.Item(i)) Then .Item(i) = .Item(i)
Next
dest.Resize(.Count, 2) = Application.Transpose(Array(.keys, .items))
dest.CurrentRegion.Columns(2).TextToColumns Sheets("Output Format").Range("B8"), 1, , , , , , , 1, "|"
End With
Application.DisplayAlerts = True
End Sub
Bookmarks