Thanks Bernd,
I actually already have a similar concatenation udf I've written myself. I
was just trying to come up with a way of tricking Excel into doing it without
the help of a udf.
Ryan
" wrote:
Hi Ryan,
(Idea: http://www.mcgimpsey.com/excel/udfs/multicat.html, this one
works also on arrays)
Option Explicit
'********************************************
'Purpose: Concatenate all cells in a range or
' array
'Inputs: vP - range/array to be concatenated
' sDelim - optional delimiter to be
' inserted between text parts
'Returns: Concatenated string
'*****************************************
Function MultiCat( _
ByRef vP As Variant, _
Optional ByVal sDelim As String = "") _
As String
Dim vE As Variant
For Each vE In vP
MultiCat = MultiCat & sDelim & vE
Next vE
MultiCat = Mid(MultiCat, Len(sDelim) + 1)
End Function
HTH,
Bernd