Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub CommandButton1_Click()
- Const sDELIM As String = ", "
- Dim rCell As Range
- Dim sMergeStr As String
- With Selection
- For Each rCell In .Cells
- sMergeStr = sMergeStr & sDELIM & rCell.Text
- Next rCell
- Application.DisplayAlerts = False
- .Merge Across:=False
- Application.DisplayAlerts = True
- .Item(1).Value = Mid(sMergeStr, 1 + Len(sDELIM))
- End With
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement