This is a bit clumsy but seems to work - Put this event in the sheet module:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 And Target.Value <> "" Then
Application.EnableEvents = False
Dim r As Long, c As Long, i As Long, n As Long: n = 2
Dim Index As String, Item As String, S As String
Index = Left(Cells(2, 1), InStr(1, Cells(2, 1), " ") - 1)
i = InStr(1, Cells(2, 1), " ")
Item = Right(Cells(2, 1), Len(Cells(2, 1)) - i)
S = Index
For r = 2 To Range("A" & Rows.Count).End(xlUp).Row
i = InStr(1, Cells(r, 1), " ")
Item = Right(Cells(r, 1), Len(Cells(r, 1)) - i)
If Left(Cells(r, 1), i - 1) = Index Then
S = S & "," & Item: c = c + 1: GoTo GetNext
End If
c = c + 1: Cells(n, 2).Resize(1, c) = Split(S, ","): n = n + 1
Index = Left(Cells(r, 1), InStr(1, Cells(r, 1), " ") - 1)
c = 0: r = r - 1: S = Index
GetNext: Next r
c = c + 1: Cells(n, 2).Resize(1, c) = Split(S, ",")
End If
Application.EnableEvents = True
End Sub
Bookmarks