First create a Dynamic Named Range so that you don't include more rows than necessary.... This will allow you to grow rows.
Go to Formula Tab and then Define Name.. enter a name like MyList and enter formula in Refers to field like: =Sheet1!$A1:INDEX(Sheet1!$B:$B,COUNTA(Sheet1!$A:$A)) assuming data is in column A:B of Sheet1.
then hold the Alt key and press F11 to get the VB Editor, go to Insert and select Module and paste this code in the Editor:
Close the editor.
In cell C1 enter formula:
=SUBSTITUTE(TRIM(aconcat(IF(INDEX(MyList,0,2)>0,INDEX(MyList,0,1),"")," "))," ",", ")
and hold the CTRL and SHIFT keys down and hit ENTER. You should see { } brackets appear around the formula and get your results.
Note that this method may be limited if you have excess number of rows....
Bookmarks