Hi Noewon,
In your sample file, you have "User1" & User 1" .. These are considered two different users. I have attached a sample workbook for your reference. Let me know if this is what you're looking for
Sub test()
Dim a: a = Range("A2", Range("A" & Rows.Count).End(3).Resize(, 2))
With CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
For x = 1 To UBound(a)
If InStr(a(x, 2), vbLf) > 0 Then
For i = 0 To UBound(Split(a(x, 2), vbLf))
.Item(Split(a(x, 2), vbLf)(i)) = IIf(Len(.Item(Split(a(x, 2), vbLf)(i))) > 0, .Item(Split(a(x, 2), vbLf)(i)) & vbLf & a(x, 1), a(x, 1))
Next
Else
.Item(a(x, 2)) = IIf(Len(.Item(a(x, 2))) > 0, .Item(a(x, 2)) & vbLf & a(x, 1), a(x, 1))
End If
Next
Range("D2").Resize(.Count, 2) = Application.Transpose(Array(.keys, .items))
End With
End Sub
Bookmarks