Answers for "excel vba concatenate"

VBA
0

excel vba concatenate range

Public Function ConcatenateRange(pRange As Range, Optional pDelimiter As String = " ") As String
    ConcatenateRange = Join(WorksheetFunction.Transpose(pRange.Value), pDelimiter)
End Function

Sub TestMe()
    Dim r As Range
    Set r = ThisWorkbook.Worksheets(1).Range("A1:A10")
    MsgBox ConcatenateRange(r)
End Sub
Posted by: Guest on January-20-2021
0

vba concatenate string

"1" & "2"    => "12"
"1" + "2"    => "12"
"1" + 2      => 3
1 + "2"      => 3
"a" + 2      => type mismatch
"1" & Null   => "1"
"1" + Null   => Null
Posted by: Guest on January-31-2021

Code answers related to "VBA"

Browse Popular Code Answers by Language