Created
June 25, 2015 10:21
-
-
Save jami-i/de7c5ee149bd21c257a1 to your computer and use it in GitHub Desktop.
mkString in Visual Basic
This file contains 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
Function mkString(mid As String, arg As Range) As String | |
Dim c As Range, ans As String | |
For Each c In arg | |
ans = ans & c.Text & mid | |
Next c | |
mkString = left(ans, Len(ans) - len(mid)) | |
End Function | |
Function mkString2(l As String, mid As String, r As String, arg As Range) As String | |
Dim c As Range, ans As String | |
For Each c In arg | |
ans = ans & c.Text & mid | |
Next c | |
mkString2 = l & left(ans, Len(ans) - len(mid)) & r | |
End Function | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment