Merged cells
Sub findmerge()
Dim r As Range
Dim rr As Range
For Each r In ActiveSheet.UsedRange
If r.MergeCells = True Then
If rr Is Nothing Then
Set rr = r
Else
Set rr = Union(rr, r)
End If
End If
Next
If rr Is Nothing Then
Else
rr.Select
End If
This will find all merged cells in the worksheet.
--
Gary''s Student - gsnu200719
"GARY" wrote:
When trying to sort a worksheet, a box is displayed saying "This
operation requires the merged cells to be identically sized".
(The current worksheet contains data copied from a number of other
worksheets)
In the current worksheet, how do I find which cell(s) are the merged
cells?
|