这段宏可以实现合并多列单元格并设置自动换行。
宏如何使用及添加、修改请百度。
Sub 合并单元格()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim i%
'循环
For i = 1 To Selection.Count
StrTotal = StrTotal & Selection.Cells(i)
Next
'设置选区格式
With Selection
.MergeCells = True
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Value = StrTotal
.WrapText = True
.Orientation = 0
.AddIndent = False
End With
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub