Okay, no one said this would be easy. 
First I created a unique list of values from Column A in Column D starting in D1.
Then starting in F1 and dragging to the right and then down,
=IF(COLUMNS($A$1:A1)>COUNTIF($A$1:$A$500,$D1),"",INDEX($B$1:$B$500,SMALL(($A$1:$A$500=$D1)*ROW($A$1:$A$500),COLUMNS($A$1:A$1)+COUNTIF($A$1:$A$500,"<>"&$D1)))) entered as an array (CNTRL SHFT ENTER instead of ENTER)
That puts all values associated with A in cells in the same row as A (see attachment)
Now you need to concatenate with dashes. You could do this manually, i.e. in E1
=F1&"-"&G1&"-"&H1 but that's time consuming.
Here's a User Defined Function (UDF)
Then in E1
=IF(ISBLANK(D1),"",Concat(F1:O1) dragged down.
How we doing?
Bookmarks