要想判断合并单元格,得分为两种情况: ①:当前选中的单元格为合并单元格; ②:选区内有合并单元格; 代码一: If Selection.MergeCells or IsNull(Selection.MergeCells) Then MsgBox "选区内有合并单元格" Else MsgBox "选区内没有合并单元格" End If 代码二: Flag = False For Each Rng In Selection If Rng.MergeCells Then Flag = True Exit For End If Next If ...[ 查看全文 ]