Skip to content

Instantly share code, notes, and snippets.

@con-mo8
Created October 26, 2016 14:24
Show Gist options
  • Save con-mo8/36be5e3bdcf91ebe6a61ef4c993c8366 to your computer and use it in GitHub Desktop.
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
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