当您尝试排序的单元格范围包含合并单元格时,Excel 会出现此投诉。
但是如果纸张很大,您该如何追踪合并的单元格?
答案1
编辑 > 查找 > 格式(指定合并单元格)> 查找全部。
或者使用宏:
Option Explicit
Sub testme()
Dim myCell As Range
Dim resp As Long
For Each myCell In ActiveSheet.UsedRange.Cells
If myCell.MergeCells Then
If myCell.Address = myCell.MergeArea(1).Address Then
resp = MsgBox(prompt:="found: " _
& myCell.MergeArea.Address & vbLf & _
"Continue looking", Buttons:=vbYesNo)
If resp = vbNo Then
Exit Sub
End If
End If
End If
Next myCell
End Sub