To do this without VBA, you can use a helper column which will pick up each additional letter to add to the list for a particular number, and then search for the full concanated cell associated with each number, for your result.
Note that I suggest you do your helper column from the bottom and copied up - this will make it easier for you to pull the concanated values at the end, without using an Array Formula.
Put the formula in C21 [assuming 21 is your last data row], and copy it up to the top of your list:
=IFERROR(INDEX($C$22:C22,MATCH(A21,$A$22:A22,0)),"")&","&B21
What this does is search column C for all rows beneath the current row, to see what the most recent concanated result for that number is. It then pulls that text value ["" if there is no prior match], and adds on the value in column B for the current row. As you copy it up, each individual number's 'concanenated text' will continue to grow, adding letters where the number values match.
Then to pull those results into your table on the right, simply do the following in E1 and copy down:
=INDEX(C:C,MATCH(D1,A:A,0))
This pulls in the first matching row which has the number value you're searching for, and returns the value on that row from column C. Since the first matching value would be the one which includes all concanenated values before it, this will be a complete listing of matches to that number.
Note also that this method puts the bottom rows' letter values at the begining of the concatenation string.