I have a Google Spreadsheet where a person will add one name per row in a defined column (B). I need to generate a string like <p>Adam - Becky - John - Robert</p> in one single cell with alphabetically ordered names.I can sort the names (in the second sheet) with the formula:=sort(Sheet1!B:B, 1, TRUE)But how can I concatenate these names in another cell (in the first sheet)?
Concatenate ordered values in one single string
google spreadsheets
I found another solution thanks to this post in the Google Support forums.=arrayformula(concatenate(Proper(unique(upper(query(B2:B31,select B where B!='' order by B asc,0))))& - ))which also capitalizes each (unique) name.After this I generate my <p> with this:=<p>- &D10&</p>(I added the hyphen at the beginning since I'll have one hyphen in the end)