使用下面的代码,可以实现这样的功能,可以把EXCEL单元格中的所有合并过的,全部都取消为原始状态。
Dim StrMer As String
Dim IntCot As Integer
Dim i As Integer
For i = 2 To [B65536].End(3).Row
StrMer = Cells(i, 1).Value
IntCot = Cells(i, 1).MergeArea.Count
Cells(i, 1).UnMerge
Range(Cells(i, 1), Cells(i + IntCot - 1, 1)).Value = StrMer
i = i + IntCot - 1
Next