|You can't do it with any built-in Excel functions, but a this User Defined Function (UDF) should work:|
Open the VBA editor and insert a new standard Module.
Paste this code into the pane that opens.
In the case of your example, enter either one of these formula in G6:
Function MultString(ByVal myCell As String)
Dim rw As Integer
Dim tmpString As String
'Loop through Column A data
'If the value in a cell matches the string we are looking
'for, add the value in Column B to the end of the temp
'string with a comma and a space
For rw = 1 To Cells(Rows.Count, 1).End(xlUp).Row
If Cells(rw, 1).Value = myCell Then
tmpString = tmpString & Cells(rw, 1).Offset(0, 1) & ", "
'Strip off trailing comma and space and place result in cell
MultString = Left(tmpString, Len(tmpString) - 2)