This should do it
Option Explicit
Sub abc()
Dim a, i As Long
a = Range("a2", Cells(Rows.Count, "a").End(xlUp).Offset(, 3)).Value
Application.ScreenUpdating = False
With CreateObject("scripting.dictionary")
.comparemode = 1
For i = 1 To UBound(a)
If Not .exists(a(i, 1) & a(i, 2)) Then
.Item(a(i, 1) & a(i, 2)) = a(i, 4)
Else
.Item(a(i, 1) & a(i, 2)) = .Item(a(i, 1) & a(i, 2)) & vbCrLf & a(i, 4)
End If
Next
For i = 1 To UBound(a)
Cells(i, "e").Offset(1) = .Item(a(i, 1) & a(i, 2))
Next
End With
Application.ScreenUpdating = True
End Sub
Bookmarks