Skip to content

Instantly share code, notes, and snippets.

@LGM-AdrianHum
Created August 15, 2016 02:24
Show Gist options
  • Save LGM-AdrianHum/ee6ca42ce31aafa8bf355906ea547f75 to your computer and use it in GitHub Desktop.
Save LGM-AdrianHum/ee6ca42ce31aafa8bf355906ea547f75 to your computer and use it in GitHub Desktop.
Function Combine(WorkRng As Range, Optional Sign As String = ",") As String
Dim Rng As Range
Dim OutStr As String
For Each Rng In WorkRng
If Rng.Text <> "," Then
OutStr = OutStr & Rng.Text & Sign
End If
Next
Combine = Left(OutStr, Len(OutStr) - 1)
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment