Thread
:
Merged cells
View Single Post
#
5
Posted to microsoft.public.excel.misc
Gary''s Student
external usenet poster
Posts: 11,058
Merged cells
I didn't know either. I just merged two cells with the Recorder on and
looked at the result.
--
Gary''s Student - gsnu200719
"Sandy Mann" wrote:
Where have you been? I spent 2 hours trying to check for Merged Cells in
code because I did not that the keyword was MergeCells not MergedCells <g
--
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
with @tiscali.co.uk
"Gary''s Student" wrote in message
...
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?
Reply With Quote
Gary''s Student
View Public Profile
Find all posts by Gary''s Student