How to use the JOIN function [VBA]
The JOIN function concatenates a set of substrings in an array, the image shows a user-defined function entered in cell C11.
Excel Function VBA Syntax
JOIN(sourcearray, [delimiter])
Arguments
sourcearray | Required. A one-dimensional array. |
[delimiter] | Optional. A delimiting character, the default value is " " (space character). |
Comments
The following user-defined function demonstrates the JOIN function.
Function JoinStrings(rng As Range, del As String) rng1 = Application.Transpose(rng.Value) JoinStrings = Join(rng1, del) End Function
The JoinStrings function lets you use two arguments, the first one being a cell range and the second one a text string. The JOIN function concatenates the substrings in array variable rng1 using the delimiting character found in variable del.
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
Contact Oscar
You can contact me through this contact form