Sub JoinAndMerge()
Dim outputText As String
Dim inputRange As Variant
Dim cell As Range
Const delim = " "
On Error Resume Next
For Each cell In Selection
outputText = outputText & cell.Value & delim
Next cell
With Selection
.Clear
.Cells(1).Value = outputText
.Merge
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.WrapText = True
End With
End Sub
0 نظر
تازه ترین ها