As long as there are no embedded spaces in any of those columns (C:Z), you could use: =substitute(trim(c2&" "&d2&" "&e2&" "...&" "&z2)," ",", ")).
Code:
Public Function MultiCat( _
ByRef rRng As Excel.Range, _
Optional ByVal sDelim As String = "") _
As String
Dim rCell As Range
For Each rCell In rRng
if rcell.value = "" then
'do nothing
else
MultiCat = MultiCat & sDelim & rCell.Text
end if
Next rCell
if len(multicat) > 0 then
MultiCat = Mid(MultiCat, Len(sDelim) + 1)
end if
End Function
And use it in a cell like:
=multicat(c2:z2,", ")
Bookmarks