标签:style row NPU range box inpu with merge 合并
Sub unmergeRange() Dim rg As Range With ActiveSheet Set rg = .UsedRange rowmax = rg.Rows.Count columnmax = rg.Columns.Count For i = 2 To rowmax For j = 1 To columnmax If .Cells(i, j).MergeCells Then Call UnMergeFunction(.Cells(i, j).MergeArea) End If Next Next End With MsgBox "OK" End Sub Sub UnMergeFunction(ra As Range) ‘unmerge the merged range, input the first value into all the merged cells With ra aaa = .Cells(1).Value .unmerge For Each Ce In .Cells Ce.Value = aaa Next End With End Sub
标签:style row NPU range box inpu with merge 合并
原文地址:https://www.cnblogs.com/sundanceS/p/12529974.html