Created
October 26, 2016 14:24
-
-
Save con-mo8/36be5e3bdcf91ebe6a61ef4c993c8366 to your computer and use it in GitHub Desktop.
Just in case anyone ever needs to join a bunch of cells together here's a function you can add to do it
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 Join(WorkRng As Range, Optional Delim As String = ";") As String | |
Dim Cell As Range | |
Dim JoinedString As String | |
For Each Cell In WorkRng | |
If Cell.Text <> "" Then | |
JoinedString = JoinedString & Cell.Text & Delim & " " | |
End If | |
Next | |
Join = Left(JoinedString, Len(JoinedString) - 2) | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment