Based on this Data:
<- A (Category) -> <- B (Items) ->
1 Cat1 a
2 Cat1 b
3 Cat1 c
4
You may try this:
Sub GroupMyValues()
Dim oCell As Excel.Range
Dim sKey As String
Dim sResult As String
Set oCell = Worksheets(2).Range("A1")
While Len(oCell.Value) > 0
If oCell.Value <> sKey Then
'If first entry, no rows to be deleted
If sKey <> "" Then
oCell.Offset(-1, 1).Value = sResult
End If
sKey = oCell.Value
sResult = oCell.Offset(0, 1).Value
Set oCell = oCell.Offset(1, 0)
Else
sResult = sResult & ", " & oCell.Offset(0, 1).Value
Set oCell = oCell.Offset(1, 0)
oCell.Offset(-1, 0).EntireRow.Delete
End If
Wend
'Last iteration
oCell.Offset(-1, 1).Value = sResult
End Sub