Put this formula in B2:

=A2

and this one in B3:

=IF(A3="","",B2&","&A3)

With cell B3 selected, double-click the fill handle, which is the small black square in the bottom right corner of the cursor - this will automatically copy the formula down to the bottom of the data that you have in column A.

If you want the overall result in C2, then you can use this formula (format as General first):

=LOOKUP("zzzzz",B:B)

Hope this helps.

Pete