The easiest way is with the help of an addin or udf function....
If you want an addin, try this free addin that include many more useful functions..it's called Morefunc.xll and can be downloaded from here:
Then apply this formula:
=SUBSTITUTE(TRIM(MCONCAT(IF($L2:$W2=TRUE,$L$1:W$11,"")," "))," ",", ")
confirmed with CTRL+SHIFT+ENTER, not just ENTER and copied down.
Or you can apply this popular UDF:
and then apply formula:
=SUBSTITUTE(TRIM(aconcatT(IF($L2:$W2=TRUE,$L$1:W$11,"")," "))," ",", ")
again, confirmed with CTRL+SHIFT+ENTER and copied down.
Bookmarks