This will work
Sub splitthem()
Dim aBefore, i As Long, key, tmp
aBefore = Range("a3", Cells(Rows.Count, 3).End(xlUp))
With CreateObject("scripting.dictionary")
For i = 1 To UBound(aBefore)
If Not .exists(aBefore(i, 1)) And Not IsEmpty(aBefore(i, 1)) Then
tmp = aBefore(i, 1)
.Item(tmp) = tmp & "|" & aBefore(i, 3)
Else
.Item(tmp) = .Item(tmp) & "|" & aBefore(i, 3)
End If
Next
i = 7
For Each key In .keys
tmp = Split(.Item(key), "|")
Cells(i, "H").Resize(, UBound(tmp) + 1) = tmp
i = i + 1
Next
End With
End Sub
Bookmarks