Added code will put the values in the cells as a concatenated string in the
upper left cell of the selection. If you want a space between entries you
can do
sStr = Trim(sStr) & " " & cell.Value
Sub CellMerge()
'
Dim cell as Range, sStr as String
If Selection.MergeCells = False then
for each cell in selection
sStr = sStr & cell.Value
cell.ClearContents
Next
selection(1,1).Value = sStr
End if
With Selection
If .MergeCells = False Then
.MergeCells = True
.HorizontalAlignment = xlCenter
Else
.MergeCells = False
End If
End With
'
End Sub