取消合并单元格的宏命令,过程太大
用录制宏命令的办法,选中整个表格,点选取消合并单元格。录制完毕后,打开发现宏命令具体如下,其中 with selection 至 End With 命令重复很多次。一运行就提示过程太大。请问是什么原因。应该如何精简调整。
Sub Macro3()
'
' Macro3 Macro
Columns("A:A").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
...
Selection.UnMerge
End Sub