Created
February 15, 2015 14:37
-
-
Save agbishara/a90a7d767abbd0853e3d to your computer and use it in GitHub Desktop.
Excel - Concatenate over a range
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Public Function JoinText(cells As Variant,Optional delim_str As String) As String | |
If cells.Columns.count < cells.Rows.count Then | |
JoinText = Join(WorksheetFunction.Transpose(cells), delim_str) | |
Else | |
JoinText = Join(WorksheetFunction.Transpose(WorksheetFunction.Transpose(cells)), delim_str) | |
End If | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment